Hello Everyone, I am trying to transpose this dataset but don't know how to transpose weightu, tempu and hru under one variable name "UNIT" (these are the units for weight, temp and hr respectively) along with the respective observation. Please help! data VS; input usubjid weight weightu $ temp tempu $ hr hru $ visit $ dd mm yy; datalines; 100 102 KG 38 C 70 BEATS/MIN WEEK1 01 01 2000 100 225 KG 97 F 71 BEATS/MIN WEEK2 14 01 2000 100 112 KG 38 C 72 BEATS/MIN WEEK3 28 01 2000 100 102 KG 38 C 72 BEATS/MIN WEEK4 07 02 2000 101 220 KG 98.6 C 75 BEATS/MIN WEEK1 01 01 2000 101 102 KG 38 C 72 BEATS/MIN WEEK2 14 01 2000 101 104 KG 38 C 73 BEATS/MIN WEEK3 28 01 2000 ; run; proc sort data=vs out=sorted_vs; by usubjid visit dd mm yy; run; proc transpose data=sorted_vs out=transp_vs name=TESTCD prefix=results; by usubjid visit dd mm yy; var weight temp hr; run;
... View more