I wanted to transform repeated measure values into new columns in R. For example, for df =
ID time
0001 11.3
0001 14.7
0008 14.3
0008 8.2
0013 11.3
0013 12.9
0013 5.1
Desired output would be to collapse ID (individuals) and transform available repeated measures into additional columns.
ID time_1 time_2 time_3
0001 11.3 14.7 NA
0008 14.3 8.2 NA
0013 11.3 12.9 5.1
I edited my initial question. I was not able to find the correct way to do it as stated above.