c_label_n_alt: Content row function to add 'alt_counts_df' row total to...

View source: R/utils_rtables.R

c_label_n_altR Documentation

Content row function to add alt_counts_df row total to labels

Description

This takes the label of the latest row split level and adds the row total from alt_counts_df in parentheses. This function differs from c_label_n() by taking row counts from alt_counts_df rather than df, and is used by add_rowcounts() when alt_counts is set to TRUE.

Usage

c_label_n_alt(df, labelstr, .alt_df_row)

Arguments

df

(data.frame)
data set containing all analysis variables.

labelstr

(string)
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.

Value

A list with formatted rtables::CellValue() with the row count value and the correct label.

See Also

c_label_n() which performs the same function but retrieves row counts from df instead of alt_counts_df.


tern documentation built on June 22, 2024, 10:25 a.m.