rtables icon indicating copy to clipboard operation
rtables copied to clipboard

`keep_titles`, etc not respected when selecting zero rows via `[`

Open gmbecker opened this issue 9 months ago • 0 comments

keep_titles works (and, I imagine, the other rtables specific args to [) if we select at least one row, but not if we select zero rows:

lyt <- basic_table(title = "hiya I'm a title!") %>%
    split_rows_by("ARM") %>%
    analyze("AGE")

tbl <- build_table(lyt, ex_adsl)
> main_title(tbl[1, , keep_titles = TRUE])
[1] "hiya I'm a title!"
> main_title(tbl[integer(), , keep_titles = TRUE])
[1] ""

gmbecker avatar May 21 '24 17:05 gmbecker