Chapter Contents |
Previous |
Next |
The TRANSPOSE Procedure |
Main discussion: | BY |
Featured in: | Transposing BY Groups |
Restriction: | You cannot use PROC TRANSPOSE with a BY statement or an ID statement with an engine that supports concurrent access if another user is updating the data set at the same time. |
Required Arguments |
Options |
The requirement for ordering or indexing observations according to the values of BY variables is suspended for BY-group processing when you use the NOTSORTED option. In fact, the procedure does not use an index if you specify NOTSORTED. The procedure defines a BY group as a set of contiguous observations that have the same values for all BY variables. If observations with the same values for the BY variables are not contiguous, the procedure treats each contiguous set as a separate BY group.
Transpositions with BY Groups |
Transposition with BY Groups shows what happens when you transpose a data set with BY groups. TYPE is the BY variable, and SOLD, NOTSOLD, REPAIRED, and JUNKED are the variables to transpose.
Note: If a BY group in the input data set has more observations than
other BY groups, PROC TRANSPOSE assigns missing values in the output data
set to the variables that have no corresponding input observations.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.