I have data formatted in the following way
-------------------------
| A | a | 1 |
-------------------------
| A | a | 2 |
-------------------------
| A | a | 3 |
-------------------------
| B | b | 1 |
-------------------------
| B | b | 3 |
-------------------------
| B | b | 5 |
-------------------------
Basically, if the first key is the same, all the columns except the last one are the same. I want to make the data-frame more compact and make it so instead of one observation per instance of the last column, I have a list of numbers
Something like this:
-------------------------
| A | a | 1,2,3 |
-------------------------
| B | b | 1,3,5 |
-------------------------
I am learning the tidyverse in R, but I am very new and I have not been able to find the right function to do this yet. I appreciate any input.