summarize_categorical: Calculates and formats N's and percentages for categorical...

Description Usage Arguments Value

Description

Calculates and formats N's and percentages for categorical and dichotomous data

Usage

1
2
summarize_categorical(data, variable, by, var_label, stat_display,
  dichotomous_value, missing)

Arguments

data

Data frame

variable

Character variable name in data that will be tabulated

by

Character variable name in data that Summary statistics for variable are stratified

var_label

String label

stat_display

String that specifies the format of the displayed statistics. The syntax follows glue inputs with n, N, and p as input options.

dichotomous_value

If the output is dichotomous, then this is the value of the variable that will be displayed.

missing

whether to include NA values in the table. missing controls if the table includes counts of NA values: the allowed values correspond to never ("no"), only if the count is positive ("ifany") and even for zero counts ("always"). Default is "ifany".

Value

formatted summary statistics in a tibble.


ddsjoberg/clintable documentation built on June 9, 2019, 1:51 a.m.