rtables
rtables copied to clipboard
`keep_titles`, etc not respected when selecting zero rows via `[`
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] ""