-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Description
Is your feature request related to a problem? Please describe.
A named list is useful in making sure things are in order. It could be nice that when using tbl_merge() that the tab_spanner defaults to those names.
Describe the solution you'd like
library(survival)
library(gtsummary)
t1 <-
glm(response ~ trt + grade + age, trial, family = binomial) %>%
tbl_regression(exponentiate = TRUE)
t2 <-
coxph(Surv(ttdeath, death) ~ trt + grade + age, trial) %>%
tbl_regression(exponentiate = TRUE)
table_list <- list("**Tumor Response**"=t1, "**Time to Death**"=t2)
tbl_merge(
tbls = table_list,
tab_spanner = names(table_list)
)
This is what it would look like but you wouldn't need to explicitly specify the names. I would find this useful for something like this:
tbl_merge(
tbls = list("**Tumor Response**"=t1, "**Time to Death**"=t2)
)
Additional context
This ensures the ordering is correct and is a slick default if names are present.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels