I would like to know if exist a method "automatic" for calculted more column in the same time.
library(dplyr)
abc <- iris %>%
group_by(Species) %>%
summarise(abc = sum(Petal.Width)) %>%
ungroup()
abc2 <- iris %>%
group_by(Species) %>%
summarise(abc = sum(Sepal.Width)) %>%
ungroup()
I can use this code for each column but if i need to do more column (in this dataset the first four), how can I do? And I need in the same dataset, it is possible?