I have the following data:
State Name Population
1 NY New York 1
2 NJ New Jersey 2
3 CA California 1
4 RI Rhode Island 1
5 NY New York 1
I want to use R to sum up the population column for all unique combination of the state and name columns. So the end result will be:
State Name Population
1 NJ New Jersey 2
2 NY New York 2
3 CA California 1
4 RI Rhode Island 1
Any help is greatly appreciated!