As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Difference between revisions of "Tip of the Day:July 16"

From sasCommunity
Jump to: navigation, search
m (Scheduled July 16, 2010)
(Scheduled Creating a flag avoiding the If ... Then Structure)
 
Line 5: Line 5:
 
sasCommunity Tip of the Day
 
sasCommunity Tip of the Day
 
</h1><div style="padding:10px;">
 
</h1><div style="padding:10px;">
{{Tips:Box Cox Transformation}}
+
{{Tips:Creating a flag avoiding the If ... Then Structure}}
 
<div style="width:100%"><hr></div>
 
<div style="width:100%"><hr></div>
Feel free to [[Tips Talk:Box Cox Transformation|comment]] on this tip.
+
Feel free to [[Tips Talk:Creating a flag avoiding the If ... Then Structure|comment]] on this tip.
 
</div>
 
</div>
 
</td></tr>
 
</td></tr>

Latest revision as of 21:55, 22 June 2015

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