O'Reilly logo

Combining and Modifying SAS® Data Sets: Examples Second Edition by Michele M. Burlew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example 8.15 Applying the Same Operation to a Group of Variables

Goal

Apply operations to selected numeric and character variables in a data set by using arrays without explicitly listing all the variables' names.

Example Features

Featured StepDATA step
Featured Step Options and StatementsARRAY statement, _NUMERIC_ and _CHARACTER_ lists

Input Data Set

Data set GLUCOSE records several glucose measurements at different times for four patients. The data set has allocated four variables to hold the evaluations of the four glucose results. When this data set is created, the evaluations are not completed and are coded with question marks (?).

 GLUCOSE patient_ glucose_ eval_ glucose_ glucose_ glucose_ Obs id fast fast 1hr eval_1hr 2hr eval_2hr 4hr ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required