I have a data frame of consisting two columns "Players" & "points"
x<-data.frame(Players=c("Player1","Player2","Player3","Player2","Player3","Player1"),points=c(10,20,30,13,17,18))
Players points
1 Player1 10
2 Player2 20
3 Player3 30
4 Player2 13
5 Player3 17
6 Player1 18
I want to sort the data by players and sum the points:
Like this:
Players x
1 Player1 28
2 Player2 33
3 Player3 47