by-split: Split a data frame

Description Usage Arguments Value Author(s) See Also Examples

Description

Split a dataframe according to the levels of variables in the dataframe. The variables to split by can be given as a formula or as a character vector.

Usage

1

Arguments

formula

Variables to split data frame by, as <e2><80><98>as.quoted<e2><80><99> variables, a formula or character vector.

data

A data frame

drop

Logical indicating if levels that do not occur should be dropped. Deprecated; levels that do not occur are ignored.

...

Additional arguments, currently not used.

Value

A list of dataframes.

Author(s)

S<c3><b8>ren H<c3><b8>jsgaard, [email protected]

See Also

orderBy, summaryBy, transformBy

Examples

1
2
3
4
5
6
data(dietox, package="doBy")
splitBy(formula = ~Evit + Cu, data = dietox)
splitBy(formula = c("Evit", "Cu"), data = dietox)

splitBy(~Month, data=airquality)
splitBy("Month", data=airquality)

doBy documentation built on May 1, 2019, 6:31 p.m.