Description Usage Arguments Details
View source: R/aggregate_all.r
This function aggregates the specified columns of a data.frame by the specified grouping variables, It also prepares additional aggregations in which each grouping var is set to 'ALL'
1 | aggregate_all(df, group_vars, agg_vars, fun = sum, no_all = NULL)
|
df |
A data.table or data.frame |
group_vars |
A character string of variable names to group by |
agg_vars |
A character string of variable names to aggregate |
fun |
The function with which to perform aggregation, default is |
no_all |
A character string indicating which variables are not required to have an 'ALL' row in the final aggregated product, defaults to NULL |
If no_all
== group_vars
then this function merely performs a standard data.table aggregation,
but if no_all
!= group_vars
then this function returns all unique combinations of aggregations. Drops
columns that do not appear in group_vars
or no_all
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.