Prepare data for treatment compliance table
prepare_base_char_subgroup.Rd
Prepare data for treatment compliance table
Usage
prepare_base_char_subgroup(
meta,
population,
analysis = "base_char_subgroup",
parameter,
subgroup_var,
subgroup_header = c(meta$population[[population]]$group, subgroup_var),
display_subgroup_total = TRUE
)
Arguments
- meta
A metadata object created by metalite.
- population
A character value of population term name. The term name is used as key to link information.
- analysis
A character value of analysis term name. The term name is used as key to link information.
- parameter
A character value of parameter term name. The term name is used as key to link information.
- subgroup_var
A character value of subgroup variable name in observation data saved in
meta$data_observation
.- subgroup_header
A character vector for column header hierarchy. The first element will be the first level header and the second element will be second level header.
- display_subgroup_total
A logic value of displaying the total group.
Examples
meta <- meta_sl_example()
outdata <- prepare_base_char_subgroup(
meta,
population = "apat",
parameter = "age",
subgroup_var = "TRTA",
subgroup_header = c("SEX", "TRTA"),
display_subgroup_total = TRUE
)