I am unable to figure out how to tell the tbl_summary function to display decimal places when summarizing categorical variables. It works quite well with continuous variables like 'mpg', but not for 'cyl'.
library(tidyverse)
library(gtsummary)
# with decimal places
mtcars %>%
select(mpg) %>%
tbl_summary(digits = list(everything() ~ c(2)))
# no decimal places
mtcars %>%
select(cyl) %>%
tbl_summary(digits = list(everything() ~ c(2)))
Thanks!
Richi