summarizor()This function was written to allow easy demonstrations
of flextable's ability to produce table summaries (with summarizor()).
It assumes that we have either a quantitative variable, in which
case we will display the mean and the standard deviation, or a
qualitative variable, in which case we will display the count and the
percentage corresponding to each modality.
fmt_2stats(
num1,
num2,
cts,
pcts,
num1_mask = "%.01f",
num2_mask = "(%.01f)",
cts_mask = "%.0f",
pcts_mask = "(%.02f %%)"
)a numeric statistic to display such as a mean or a median
a numeric statistic to display such as a standard deviation or a median absolute deviation.
a count to display
a percentage to display
format associated with num1, a format string
used by sprintf().
format associated with num2, a format string
used by sprintf().
format associated with cts, a format string
used by sprintf().
format associated with pcts, a format string
used by sprintf().
summarizor(), tabulator(), mk_par()