September 2018
Beginner
206 pages
4h 27m
English
Splitting data can be accomplished using base R with the split() function. Its simplest use would be to input a dataset you'd like to be split followed by a factor variable to split that dataset by.unsplit() works in a very similar fashion.
dplyr also has functions that facilitate splitting data, which can be rejoined with combination methods we will cover in more detail very soon in this section. Often, these alternative methods will require less code.
Let's explore both of these possibilities in the next section.