Skip to content

Coexistence of trim_levels_to_map() and add_combo_levels(). #1097

Description

@wwojciech

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 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions