在使用 gtsummary() 包创建我的描述性表格时,我得到了一张很长的表格。是否可以将这样的表拆分为多个较短的表?
通过这个示例数据集,我想说明我的意思:
library(gtsummary)
# make dataset with a few variables to summarize
trial2 <- trial %>% select(age, grade, response, trt)
# summarize the data with our package
table1 <- tbl_summary(trial2)
table1
给出这个输出:
所需的输出:
我试过:
library(gtsummary)
# make dataset with a few variables to summarize
trial2 <- trial %>% select(age)
trial3 <- trial %>% select(grade)
trial4 <- trial %>% select(response)
trial5 <- trial %>% select(trt)
# summarize the data with our package
table1 <- tbl_summary(trial2)
table2 <- tbl_summary(trial3)
table3 <- tbl_summary(trial4)
table4 <- tbl_summary(trial5)
table1
table2
table3
table4