The tools from the tidyr
package help you re-arrange tabular data stored in data frames, with an emphasis on helping you normalize datasets.
There are 4 main functions for re-arranging data in the tidyr
package:
gather()
: transforms data from wide(r) to long(er)spread()
: transforms data from long(er) to wide(r)separate()
: splits a single column into multiple columnsunite()
: combines multiple columns into a single column