powered by
This takes a table1 object and outputs a `flextable` version.
table1_flextable(tab, spanner = NULL)
the table1 object
the label above the grouping variable (if table1 is grouped) or any label you want to include over the statistics column(s)
library(furniture) library(dplyr) data('nhanes_2010') nhanes_2010 %>% group_by(asthma) %>% table1(age, marijuana, illicit, rehab, na.rm = FALSE) %>% table1_flextable(spanner = "Asthma")
Run the code above in your browser using DataLab