library(dplyr)
colon_s %>%
summarise(age.factor = ff_mode(age.factor))
colon_s %>%
select(sex.factor, rx.factor, obstruct.factor, perfor.factor) %>%
summarise(across(everything(), ff_mode))
colon_s %>%
reframe(across(where(is.factor), ff_mode))
# Note, 4 rows is returned in this example because 4 factor levels within `hospital`
# have the same frequency.
Run the code above in your browser using DataLab