A simple statistics function which prepares the numbers with percentages in the required format, for use in a split content row. The denominator here is from the expected visits column.
cmp_cfun(df, labelstr, .spl_context, variables, formats)The rtables::in_rows() result with the counts and proportion statistics.
(data.frame)
data set containing all analysis variables.
(character)
label of the level of the parent split currently being summarized
(must be present as second argument in Content Row Functions). See rtables::summarize_row_groups()
for more information.
(data.frame)
gives information about ancestor split states
that is passed by rtables.
(list)
with variable names of logical columns for
expected, received and missing visits.
(list)
with the count_percent format to use for the received
and missing visits columns.
cmp_post_fun() for the corresponding split function.