cascade

0th

Percentile

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.

Usage
cascade(.data, ..., .dots, .fill = NA)
Arguments
.data,

tbl A tbl_svy object

...

Name-value pairs of summary functions

.dots

Used to work around non-standard evaluation. See vignette("nse", package = "dplyr") for details.

.fill

Value to fill in for group summaries

Aliases
  • cascade
Examples
# NOT RUN {
library(survey)
data(api)

dstrata <- apistrat %>%
  as_survey_design(strata = stype, weights = pw)

dstrata_grp <- dstrata %>%
  group_by(stype)

dstrata_grp %>%
  cascade(api99 = survey_mean(api99),
            api00 = survey_mean(api00),
            api_diff = survey_mean(api00 - api99))

# }
Documentation reproduced from package srvyr, version 0.3.5, License: GPL-2 | GPL-3

Community examples

Looks like there are no examples yet.