Tip of the Day:July 16

From sasCommunity
Jump to: navigation, search

sasCommunity Tip of the Day

When building binary flags in a SAS DATA Step you can avoid the IF-THEN/ELSE structure such as:

IF MIN(x , y) GT 4 THEN flag = 1 ;
                   ELSE flag = 0 ;

by using alternate statement forms:

flag = MIN(x , y) GT 4 ;

or

flag = IFN(MIN(x , y) GT 4 , 1 , 0) ;
Submitted By Salvador Ambrosio



Feel free to comment on this tip.


Prior tip - Next tip - Random Tip

Submit a Tip