split_by(CO2, ~Treatment+Type)
split_by(CO2, Treatment, Type)
split_by(CO2, c("Treatment", "Type"))
split_by(CO2, Treatment)
x <- CO2 |> split_by(~Treatment)
head(x, 3)
tail(x, 3)
x <- CO2 |> split_by(~Treatment, omit=FALSE)
head(x, 3)
tail(x, 3)
## The "Old" interface
splitBy(~Treatment+Type, CO2)
splitBy(~Treatment+Type, data=CO2)
splitBy(c("Treatment", "Type"), data=CO2)
Run the code above in your browser using DataLab