summary_table: weighted summary table

Description Usage Arguments Details Value Examples

View source: R/SummaryStatistics.R

Description

summary_table returns a tibble containing a weighted summary table of a single variable.

Usage

1
summary_table(df, variable, weight, name_style = "clean")

Arguments

df

The data source

variable

the variable to summarize, it should be numeric

weight

The weighting variable

name_style

the style of the column names–one of "clean" or "pretty." Clean names are all lower case and words are separated by an underscore. Pretty names begin with a capital letter are words a separated by a space.

Details

The resulting tible includes columns for the variable name, unweighted observations, weighted observations, weighted mean, minimum value, maximum value, unweighted missing values, and weighted missing values

Value

a tibble

Examples

1
2
summary_table(illinois, age, weight)
summary_table(illinois, age, weight, name_style = "pretty")

pollster documentation built on Aug. 25, 2020, 5:08 p.m.