Apply a summarise condition to a range of columns when using dplyr group_by?
问题 Suppose we want to group_by() and summarise a massive data.frame with very many columns, but that there are some large groups of consecutive columns that will have the same summarise condition (e.g. max , mean etc) Is there a way to avoid having to specify the summarise condition for each and every column, and instead do it for ranges of columns ? Example Suppose we want to do this: iris %>% group_by(Species) %>% summarise(max(Sepal.Length), mean(Sepal.Width), mean(Petal.Length), mean(Petal