An example of using dplyr, the following iteration of plyr:
df2 <- df1 %>% group_by(ID) %>% summarize(Sum_PSM = sum(PSM))
When you put %>% , you are a "pipe". This means that you enter what is on the left side of this pipe operator and perform the function on the right.
Chelsea
source share