splitter_d {plyr}R Documentation

Split a data frame by variables

Description

Split a data frame into pieces based on variable contained in that data frame

Usage

splitter_d(data, .variables = NULL, drop = TRUE)

Arguments

data
.variables
drop

Details

This is the workhorse of the d*ply functions. Based on the variables you supply, it breaks up a single data frame into a list of data frames, each containing a single combination from the levels of the specified variables.

This is basically a thin wrapper around split which evaluates the variables in the context of the data, and includes enough information to reconstruct the labelling of the data frame after other operations.

Value

a list of data.frames, with attributes that record split details

Author(s)

Hadley Wickham <h.wickham@gmail.com>

See Also

. for quoting variables, split

Examples

splitter_d(mtcars, .(cyl))
splitter_d(mtcars, .(vs, am))
splitter_d(mtcars, .(am, vs))

[Package plyr version 0.1.5 Index]