My data set looks like this:
Col1 Col2
AA ID1
BB ID2
CC ID3
BB ID4
AA ID5
I would like to separate values in Col2 based on the categories of Col1. The final product would look like this:
AA BB CC
ID1 ID2 ID3
ID5 ID4 NA
I have been trying different for loops without success. I am thinking there must be a much easier way. Any chance someone would know a simple trick?
Thank you!