Previous Page | Next Page

The TRANSPOSE Procedure

Example 2: Naming Transposed Variables


Procedure features:

PROC TRANSPOSE statement options:

NAME=

PREFIX=

ID statement

Data set: SCORE

This example uses the values of a variable and a user-supplied value to name transposed variables.


Program

 Note about code
options nodate pageno=1 linesize=80 pagesize=40;
 Note about code
proc transpose data=score out=idnumber name=Test
     prefix=sn;
    id studentid;
run;
 Note about code
proc print data=idnumber noobs;
   title 'Student Test Scores';
run;

Output

 Note about figure
                              Student Test Scores                              1

  Test     sn0545    sn1252    sn1167    sn1230    sn2527    sn4860    sn0674

  Test1      94        51        95        63        80        92        75  
  Test2      91        65        97        75        76        40        78  
  Final      87        91        97        80        71        86        72  

Previous Page | Next Page | Top of Page