Is there any reason why the STUDYID column in the map is ignored in the layout below?
map <- tribble(
~ARM, ~STUDYID,
"A: Drug X", "n",
"B: Placebo", "mean"
)
combo_df <- tribble(
~valname, ~label, ~levelcombo, ~exargs,
"n", "n", select_all_levels, list(),
"mean", "mean", select_all_levels, list(),
)
lyt <- basic_table() |>
split_cols_by("ARM", split_fun = trim_levels_to_map(map)) |>
split_cols_by("STUDYID", split_fun = add_combo_levels(combo_df)) |>
analyze("BMRKR1", afun = simple_analysis)
tbl <- build_table(lyt, ex_adsl)
tbl
A: Drug X B: Placebo
n mean n mean
———————————————————————————————————
Mean 5.97 5.97 5.70 5.70
Is there any reason why the
STUDYIDcolumn in themapis ignored in the layout below?