Description Usage Arguments Value Examples
A convenience function for summation using quoted variable names
1 | sum_to(data_frame, group_by)
|
data_frame |
The data frame |
group_by |
The variables you want to keep as breakouts in the aggregated data, as a character vector of variable names. This should include any variable you plan to use on an X-axis (e.g. Fiscal.Year). |
y_vars |
The variables you want to aggregate, as a character vector of variable names. By default, all numeric or integer variables that are not listed in the group_by argument. Variables that are not listed in either group_by or y_vars will be rolled up in the aggregation and absent from the returned data frame. |
An aggregated data frame
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.