02-12-2015 04:52 PM
I have a data set with that looks like:
I would like a unique data set by ID and a new variable for all the file periods, for example:
ID File_Period_1 File_Period_2 File_Period_3
1 201301 201302 201303
2 201302 201301
The number of file periods will vary by ID.
I'm not sure what the best way to run this loop, any help greatly appreciated.
Thanks in advance!
02-12-2015 05:07 PM
What you are doing is often called transposing from Long to Wide format.
proc transpose data=have out=want (drop=_name_)
Please make your entries Questions in the format not Discussions when they are questions.