
Last chance! 50% off unlimited learning
Sale ends in
split
function.## S3 method for class 'formula':
split (x, f, drop = FALSE, data = NULL, ...)
y ~ x
.as.factor(f)
defines the grouping, or a list of such factors in which case their interaction is used for the grouping.f
is a factor
or a list).
Defaults to FALSE.split
.split
split(extra ~ group, data = sleep)
Run the code above in your browser using DataLab