R - summarise_if for counts and proprotions

Viewed 18

I have used the following code for mean and SD. Is there an equivalent that allows to give counts and proportions for all categorical variables of a database? Thank you

table1 <- dat_long %>%
  filter(time ==  "0month")%>%
  group_by(group) %>%
  summarise_if( is.numeric, funs(mean + sd)) %>%
  print(width=Inf)
0 Answers
Related