View source: R/methods-epi_df.R
sum_groups_epi_df | R Documentation |
epi_df
objectAggregates an epi_df
object by the specified group columns, summing the
value
column, and returning an epi_df
. If aggregating over geo_value
,
the resulting epi_df
will have geo_value
set to "total"
.
sum_groups_epi_df(.x, sum_cols, group_cols = "time_value")
.x |
an |
sum_cols |
< |
group_cols |
character vector of column names to group by. "time_value" is included by default. |
an epi_df
object
# This data has other_keys age_group and edu_qual:
grad_employ_subset
# Aggregate num_graduates within each geo_value (and time_value):
grad_employ_subset %>%
sum_groups_epi_df(num_graduates, group_cols = "geo_value")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.