For the following table, I am trying to find an easy way in either excel or R to consolidate rows by ID number, and essentially create new columns for every duplicate entry. For example, for ID number 121, I would want one row with ID = 121, but multiple columns : CT Scan|01/01/2021|US Abdomen|02/01/2021, i.e 2 rows with the same ID are transformed into 1 row with 5 columns. Would appreciate help with how to going about doing this operation
Asked
Active
Viewed 27 times