Description Usage Arguments Value Examples
Executes an R expression using variables from the dataset, possibly separately for each level of a given varlist (like the by
prefix in Stata).
1 |
expr |
an R expression which can use any of the variable names in the current dataset. It can be quoted or unquoted. |
by |
a variable list in "var1 var2 var3" format or, if a single variable, it can be unquoted (var1). The R expression will be applied separately for the data subsetted to each level of the variable list. |
returns whatever the expression expr
returns. If by
is specified, it will be a list of the result for applying the expression to each section of the data
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.