Working in R, I have data in the format
1 a
1 b
2 c
2 d
2 e
I want to reshape the data as:
1 a b null
2 c d e
Essentially, I want one row for each value in the first column and one column for each value in the second column that maps to the same value in the first column.