Returns n (%) per category and group. The denominator is the number of
distinct subjects in each group. A zero count prints as "0".
Usage
stat_freq(
df,
var,
trt_var,
label = var,
id_var = "USUBJID",
digits = 1L,
total = TRUE,
total_label = "Total",
levels_order = NULL
)Arguments
- df
Data frame.
- var
Analysis column.
- trt_var
Treatment/grouping column.
- label
Row label for the block.
- id_var
Subject identifier column.
- digits
Decimals for the mean, SD, median and quartiles.
- total
Add a total column?
- total_label
Name of the total column.
- levels_order
Optional category order. The default is sorted categories.