Skip to content
Prev 304201 / 398503 Next

if then in R versus SAS

On Aug 24, 2012, at 21:51 , Daniel Nordlund wrote:

            
It's almost certain that they are not scalar though, so Marc's idea is likely right. 

Just let me add that ifelse() is not actually needed:

MOC <- as.numeric((otype == 'M') & (ocond == '1') & (entry == 'a.Prop'))

will do. (And the as.numeric bit is only to convert FALSE/TRUE to 0/1)