Aggregating with dplyr is easy! You can use the group_by() and the summarize() functions for this. Some examples are given below.
CODE:
# Aggregating with dplyr
library(dplyr)
df = data.frame(group=c("Group 1","Group 1","Group 2","Group 2","Group 2&...