I have a data frame that I am trying to condense. There are multiple value os X with the same names but with different Y values associated with them:
  X Y
1 a 1
2 b 3
3 a 2
4 c 4
5 b 7
I want to condense the data frame so there are no duplicate names in X, like below:
  X Y
1 a 3
2 b 10
3 c 4
 
     
    