I am working with R Shiny for some exploratory data analysis. I have two checkbox inputs that contain only the user-selected options. The first checkbox input contains only
With dplyr 1.0.0, we have the following possibility based on the "normal" group_by:
dplyr 1.0.0
group_by
library(dplyr) group_cols <- c("vs", "am") mtcars %>% group_by(across(all_of(group_cols))) %>% summarize(mean_wt = mean(wt))