stby | R Documentation |
This is essentially the base by
function, except for the
class of the returned object.
stby(data, INDICES, FUN, ..., simplify = TRUE)
data |
an R object, normally a data frame, possibly a matrix. |
INDICES |
a grouping variable or a list of grouping variables, each of length nrow(data). |
FUN |
a function to be applied to (usually data-frame) subsets of data. |
... |
Further arguments to FUN. |
simplify |
Logical. Essentially a placeholder to maintain full
compatibility with base by. For more details, see
|
An object having classes “list” and “summarytools”.
by
, tapply
data("tobacco") with(tobacco, stby(BMI, gender, descr))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.