I have the following table structure:
Number Type Year
------ ---- ----
10 a 2000
20 b 2000
20 b 2000
10 c 2001
where I want to merge the results of cells where the column flag is the same. For example the two cells for type b, have two separate results, 20 and 20, both in the same year. I would like to end up with a data frame like this:
Number Type Year
------ ---- ----
10 a 2000
40 b 2000
10 c 2001
I can only seem to "melt" columns together at the moment. Can anyone help?