I'm attempting to recreate some code which does the opposite of what is on page 9-10 on http://support.sas.com/resources/papers/proceedings10/158-2010.pdf. So instead of making a table go from wide to long, I'd like it to become long to wide.
Id Col1 Col2
1 Val1 A
1 Val2 B
2 Val1 C
2 Val3 D
3 Val2 E
Transposes to:
Id X_Val1 X_Val2 X_Val3
1 A B .
2 C . D
3 . . E
Any ideas on how I should be going about this? I know I should be using an array and trying to create a new column X_Val1 where X_Val1 = cat('X',Val1) where X is some string.