Appendix C

Transposing with DATA Steps

 

C.1 Transposing and Performance

C.2  From a LONG Data Set to a WIDE Data Set

C.3  From a WIDE Data Set to a LONG Data Set

C.4  Transposing Transactional Categories with a DATA Step

 

C.1 Transposing and Performance

General

We saw in Chapter 14 that the TRANSPOSE procedure can be used to transpose data in a very flexible way and with a clear syntax. PROC TRANSPOSE and the macros we presented in Chapter 14 are the first choice for data transpositions.

However, in situations where the number of subjects is in the hundreds of thousands, and the number of variables or repetitions is in the thousands, performance issues might arise. In these cases it is advisable to use a SAS DATA step instead of PROC TRANPOSE. ...

Get Data Preparation for Analytics Using SAS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.