Description Usage Arguments Examples
This function takes a data table, subsets it according to the levels of one or more variables, and returns a data table containing the results computed on each subset, in addition to results computed on aggregate groups. See ddplyWithTotals for an alternative.
1 | DTplyWithTotals(DT, variables, EXPR, nestedOnly = FALSE, grandTotal = FALSE)
|
DT |
data.table object to subset. Does not require a key, see data.table. |
variables |
Vector of character strings denoting variables to split on. Variables must be factors. |
EXPR |
An expression that indicates what to do with each subset of the data table |
nestedOnly |
Logical. Compute subtotals only for nested groups. |
grandTotal |
Logical. Compute the grand total. |
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.