September 2018
Beginner
206 pages
4h 27m
English
One other useful type of splitting is the ability to split strings. While this isn't a data splitting and unsplitting method, it will often be useful to do the following to manipulate variables in a dataset. The most efficient way to accomplish string splitting in R is to use the stringr package, which contains a variety of functions that make working with strings far simpler than alternative methods in base, which include subset() and gsub(). We won't cover these methods here, however the stringr methods are highly recommended, are far more versatile, and often don't require you to write complicated regex patterns for matching.