R functions to split concatenated data, conveniently stack columns of data.frames, and conveniently reshape data.frames.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 946ceed Jul 24, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R updated email Jul 22, 2018
data general tidying up Apr 5, 2018
man updated email Jul 22, 2018
revdep cran comments Jul 22, 2018
tests prepping for appveyor testing Apr 5, 2018
.Rbuildignore prepping for appveyor testing Apr 5, 2018
.gitignore build prep Mar 29, 2018
.travis.yml warnings != errors Mar 30, 2018
DESCRIPTION updated email Jul 22, 2018
NAMESPACE prepping for appveyor testing Apr 5, 2018
NEWS.md Prepping for temporary submit Jul 22, 2018
README.md updated CRAN version Jul 24, 2018
appveyor.yml prepping for appveyor testing Apr 5, 2018
codecov.yml initial commit on v1 devel branch Mar 29, 2018
cran-comments.md cran comments Jul 22, 2018
splitstackshape.Rproj reconfig Mar 29, 2018

README.md

splitstackshape

Travis-CI Build Status AppVeyor Build Status Coverage Status

R functions to split concatenated data, stack columns of your datasets, and convert your data into different shapes.

Core Functions

  • cSplit: A core function that collects the functionality of several of the concat.split family of functions.
  • 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_l to return a list; and cSplit_e to return an "expanded" view of the input data.)
  • Stacked: A function to create a list of stacked sets of variables. Similar to melt from "reshape2", but doesn't put everything into one very long data.frame.
  • Reshape: A function to allow base R's reshape function to work with "unbalanced" datasets.
  • stratified: A function to take random row samples by groups, similar to sample_n and sample_frac from "dplyr".

Utilities

  • getanID: A function for creating a secondary ID when duplicated "id" variables are present.
  • expandRows: "Expands" the rows of a dataset.
  • listCol_l and listCol_w: Unlists (long) or flattens (wide) a column in a data.frame or a data.table stored as a list. Neither is vectorized.

Install

The package is on CRAN. You can install it using:

install.packages("splitstackshape")

To install the V2 beta version, use:

devtools::install_github("mrdwab/splitstackshape", ref = "v2.0")

To install the V1 development version, use:

devtools::install_github("mrdwab/splitstackshape", ref = "v1_development")

Current CRAN version: 1.4.6