Two simple improvements for proc transpose that would prove quite useful:
1) Allow the statement BY _N_; that would imply transposition of each single observation without requiring a unique key.
2) Allow transposition of many groups of variables, each group separated by a comma on the VAR statement, so that
variables (ID X1 Y1 X2 Y2 X3 Y3) could be transposed to (ID _NAME_ COL1 COL2) with statements
proc transpose data=have out=want;
var X:, Y:;
COL1 and COL2 would contain X1-X3 and Y1-Y3 respectively. _NAME_ would be extracted from the first variable group.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.