Chapter Contents |
Previous |
Next |
The TRANSPOSE Procedure |
PROC TRANSPOSE does not produce printed output. To print the output data set from the PROC TRANSPOSE step, use PROC PRINT, PROC REPORT, or another SAS reporting tool.
A transposed variable is a variable the procedure creates by transposing the values of an observation in the input data set into values of a variable in the output data set.
A Simple Transposition illustrates a simple transposition. In the input data set, each variable represents the scores from one tester. In the output data set, each observation now represents the scores from one tester. Each value of _NAME_ is the name of a variable in the input data set that the procedure transposed. Thus, the value of _NAME_ identifies the source of each observation in the output data set. For example, the values in the first observation in the output data set come from the values of the variable Tester1 in the input data set. The statements that produce the output follow.
proc print data=proclib.product noobs; title 'The Input Data Set'; run; proc transpose data=proclib.product out=proclib.product_transposed; run; proc print data=proclib.product_transposed noobs; title 'The Output Data Set'; run;
A Transposition with BY Groups is a more complex example that uses BY groups. The input data set represents measurements of fish weight and length at two lakes. The statements that create the output data set
A Transposition with BY Groups
For a complete explanation of the SAS program that produces A Transposition with BY Groups , see Transposing BY Groups .
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.