Summarise multiple values into cascading groups
cascade
is similar to summarise
, but calculates
a summary statistics for the total of a group in addition to each group.
cascade(.data, ..., .dots, .fill = NA)
.data, |
tbl A |
... |
Name-value pairs of summary functions |
.dots |
Used to work around non-standard evaluation. See
|
.fill |
Value to fill in for group summaries |
library(survey) data(api) dstrata <- apistrat %>% as_survey_design(strata = stype, weights = pw) dstrata_grp <- dstrata %>% group_by(stype) dstrata_grp %>% cascade(api99_mn = survey_mean(api99), api00_mn = survey_mean(api00), api_diff = survey_mean(api00 - api99))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.