I have a SAS dataset that looks like this:
id | Date | ...
1 17 Jun
1 19 Jun
2 17 Jun
2 19 Jun
2 21 Jun
3 12 May
each id represents a unique person. I want to keep only 1 row for each unique person, however, still keep the date in dataset. TO achieve this, I need to transform the table into format such as:
id | Date1 | Date2 | Date 3
1 17 Jun 19 Jun
2 17 Jun 19 Jun 21 Jun
3 12 May
If only 1 date has been assigned to that person, then keep the date2 and date3 as missing value.
The full dataset I'm using contains thousands of observations with over 180 different days. However, a unique person will at most be assigned to 5 different days.
Any help appreciated