Skip to Content
R Programming Fundamentals
book

R Programming Fundamentals

by Kaelen Medeiros
September 2018
Beginner
206 pages
4h 27m
English
Packt Publishing
Content preview from R Programming Fundamentals

Splitting Strings

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.

regex, or regular expression, is a search method used to match certain things in text. Look ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

R Programming Fundamentals

R Programming Fundamentals

Samik Sen, Marcin Dubel
Python for Programmers

Python for Programmers

Paul Deitel, Harvey Deitel

Publisher Resources

ISBN: 9781789612998Supplemental Content