当我做一个 tbl_stack 时,我想在标题的 tbl_stack 中显示组合表的总数 N。目前,结果似乎显示堆栈中第一个表的 N。
trial %>%
select(age, grade, response, trt) %>%
filter(grade == "I") %>%
tbl_summary(
by = trt,
label = list(age ~ "Patient Age"),
statistic = list(all_continuous() ~ "{mean} ({sd})"),
digits = list(age ~ c(0, 1))
)
tbl_summary_ex2a <-
trial %>%
select(age, grade, response, trt) %>%
filter(grade %in% c("II", "III", "IV")) %>%
tbl_summary(
by = trt,
label = list(age ~ "Patient Age"),
statistic = list(all_continuous() ~ "{mean} ({sd})"),
digits = list(age ~ c(0, 1))
)
tbl_stack(tbls=list(tbl_summary_ex2, tbl_summary_ex2a))