|
||
Introduction In DATA step programming, you often need to perform the same action on more than one variable. Although you can process variables individually, it is easier to handle them as a group. You can do this by using array processing. For example, using an array and DO loop, the program below eliminates the need for 365 separate programming statements to convert the daily temperature from Fahrenheit to Celsius for the year. data work.report(drop=i); set master.temps; array daytemp{365} day1-day365; do i=1 to 365; daytemp{i}=5*(daytemp{i}-32)/9; end; run; You can use arrays to simplify the code needed to
|
Time to CompleteThis lesson contains pages and takes approximately 1.5 hours to complete. |
ObjectivesIn this lesson, you learn to
|
PrerequisitesBefore taking this lesson, you should complete the following lessons:
|
Copyright
© 2003 SAS Institute Inc.,
Cary, NC, USA. All rights reserved. Terms of Use & Legal Information | Privacy Statement |