While creating my descriptive table with the gtsummary() package I get a very long table. Is it possible to split such a table in multiple shorter tables?
With this example dataset I would like to show what I mean:
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
gives this output:
desired output:
I tried:
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