Skip to content
Prev 304073 / 398503 Next

if then in R versus SAS

On Aug 24, 2012, at 1:03 PM, ramoss <ramine.mossadegh at finra.org> wrote:

            
See ?ifelse and ?Logic, both of which are covered in "An Introduction to R" (http://cran.r-project.org/manuals.html).

  MOC <- ifelse((otype == 'M') & (ocond == '1') & (entry == 'a.Prop'), 1, 0)


You might also want to think about getting a copy of:

R for SAS and SPSS Users
Robert Muenchen
http://www.amazon.com/SAS-SPSS-Users-Statistics-Computing/dp/0387094172

Regards,

Marc Schwartz