R functions to split concatenated data, stack columns of your datasets, and convert your data into different shapes.
cSplit: A core function that collects the functionality of several of the
concat.splitfamily of functions.
cSplit_f: A fast way to split columns of data where you know each row would result in the same number of values after being split.
concat.split: A set of functions to split strings where data have been concatenated into a single value, as is common when getting data collected with tools like Google Forms. (
cSplit_lto return a
cSplit_eto return an "expanded" view of the input data.)
Stacked: A function to create a list of
stacked sets of variables. Similar to
meltfrom "reshape2", but doesn't put everything into one very long
Reshape: A function to allow base R's
reshapefunction to work with "unbalanced" datasets.
stratified: A function to take random row samples by groups, similar to
getanID: A function for creating a secondary ID when duplicated "id" variables are present.
expandRows: "Expands" the rows of a dataset.
listCol_w: Unlists (long) or flattens (wide) a column in a
data.tablestored as a
list. Neither is vectorized.
The package is on CRAN. You can install it using:
To install the development version, use:
library(devtools) install_github("mrdwab/splitstackshape", ref = "devel")
Current version: 1.4.2