string vector of text to include above the summary statistics
stratified by a variable. The following fields are available for use in the
headers: n
, N
, p
, name
, and level
. n
is the number of observations in
each by group. N
is the total number of observations. p
is the percentage of rows
in a by group. name
is the name of the by variable. level
is the by variable level.
Syntax follows the glue::glue()
function, e.g. stat_by = c("{level}", "N = {n} ({p}\%)")
.
Must specify by
along with stat_by
.