Calculates and formats N's and percentages for categorical and dichotomous data
summarize_categorical(data, variable, by, var_label, stat_display,
dichotomous_value, missing)Data frame
Character variable name in data that will be tabulated
Character variable name in data that Summary statistics for
variable are stratified
String label
String that specifies the format of the displayed statistics.
The syntax follows glue inputs with n, N, and p as input options.
If the output is dichotomous, then this is the value of the variable that will be displayed.
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".
formatted summary statistics in a tibble.