r - gtsummary + strata

Viewed 29

I am reporting multiple time points for several variables using gtsummary with the following working code:

table2 <- dat_long %>%
  select( age, sbp, dbp, map,  group, time)%>%
  apply_labels(age = "Age (years)",
               sbp = "SBP (mmHg)",
               dbp = "DBP (mmHg)")%>%
  tbl_strata(strata = time, 
             .tbl_fun =
               ~ .x %>%
               tbl_summary(by = group, missing = "no") %>%
               add_n(),
             .header = "**{strata}** "  ) 

However, there are some changes that I am being unable to implement.

  1. The results are reported as median and IQR. Is it possible to change to mean and sd, while using strata?

  2. Is it possible to replace mean (sd) by mean +/- SD?

  3. Is it possible to remove the column with the "N" at each time point?

3.1) On the other hand, is it possible to add the "N" per group at each time point?

Thank you.

0 Answers
Related