Skip to content
Prev 336431 / 398513 Next

Conditional recoding for purpose of imputing

On Feb 9, 2014, at 8:03 PM, Ana Genkova wrote:

            
The "==" has no place in the second and third arguments to ifelse . It should probably be:

y <-  ifelse (x==1, "NO", "YES")

(And do note that "==" is not an assignment operator in any context.)