powered by
This is essentially the base by function, except for the class of the returned object.
by
stby(data, INDICES, FUN, ..., simplify = TRUE)
an R object, normally a data frame, possibly a matrix.
a grouping variable or a list of grouping variables, each of length nrow(data).
a function to be applied to (usually data-frame) subsets of data.
Further arguments to FUN.
Logical. Essentially a placeholder to maintain full compatibility with base by. For more details, see tapply.
tapply
An object having classes “list” and “summarytools”.
by, tapply
# NOT RUN { data("tobacco") with(tobacco, stby(BMI, gender, descr)) # }
Run the code above in your browser using DataLab