summary_table: weighted summary table

View source: R/SummaryStatistics.R

summary_tableR Documentation

weighted summary table

Description

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

Usage

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

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

jdjohn215/pollster documentation built on May 19, 2023, 4:34 p.m.