Skip to contents

Baseline Demographic and Clinical Characteristics

Usage

build_adsl_chars_table(
  title = "",
  subtitle = character(),
  footer = character(),
  split_cols_by = "ARM",
  group_by = NULL,
  summ_vars = c("AGE", "SEX", "COUNTRY"),
  disp_stat = c("n", "mean_sd", "se", "median", "range", "quantiles", "count_fraction")
)

Arguments

title

(character)
Title of the demographic table.

subtitle

(character)
Subtitle of the demographic table.

(character)
Footer of the demographic table.

split_cols_by

(character)
Arm variable used to split table into columns.

group_by

(character)
Additional Grouping Variables (max 2)

summ_vars

(vector of character)
Variables from df to include in the table.

disp_stat

(vector of character)
Statistics to display.

Value

A tabletree object.

Examples

adsl <- pharmaverseadam::adsl |> drop_missing_cols()
#> Error in loadNamespace(x): there is no package called 'pharmaverseadam'

lyt <- build_adsl_chars_table(
  split_cols_by = "ARM",
  summ_vars = c("AGE", "RACE")
)
tbl <- rtables::build_table(lyt, adsl)

if (FALSE) { # \dontrun{
tt_to_flextable(tbl)
} # }