Learn R Programming

junco (version 0.1.4)

resp01_counts_cfun: Content Row Function for Counts of Subgroups in Response Tables (RESP01)

Description

Content Row Function for Counts of Subgroups in Response Tables (RESP01)

Usage

resp01_counts_cfun(df, labelstr, .spl_context, .alt_df, label_fstr)

Value

The correct rtables::in_rows() result.

Arguments

df

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

labelstr

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

.spl_context

(data.frame)
gives information about ancestor split states that is passed by rtables.

.alt_df

(data.frame)
alternative data frame used for denominator calculation.

label_fstr

(string)
format string for the label.

Examples

Run this code
fake_spl_context <- data.frame(
  cur_col_split_val = I(list(c(ARM = "A: Drug X", count_prop = "count_prop")))
)
resp01_counts_cfun(
  df = DM,
  labelstr = "Blue",
  .spl_context = fake_spl_context,
  .alt_df = DM,
  label_fstr = "Color: %s"
)

Run the code above in your browser using DataLab