I am analyzing the NBA dataset based on players from the 2011 to 2017 season. This dataset contains information like game, points, assist, etc.
My current dataset looks something like this:
As you can see that, Rafer Alston appears three times, and PTS, TRB, and AST all reflect on his average stats during that season.
Question: Is there a way to combine these three rows into one row by summing PTS, TRB, and AST, and then dividing by three in R?
My initial thought is running the code below:
unique_player <- nba%>%group_by(Player)%>%tally()
So we can see how many times do each player appear: