Dear R-help community,


I often get this error "missing value where TRUE/FALSE needed" when I'm doing 
some loops, like with this one


for (i in 1:nrow(survey)) {

if (survey[i,7]==survey[i,3])

{survey[i,14]<-survey[i,6]}

else

if(survey[i,11]==0 && survey[i,12]==0)

{survey[i,14]<-survey[i,4]}

}


Can someone explain me what I do wrong because I don't see the difference with 
other loops that work
Thanks a lot

Sarah                                     
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to