What's pos? What's o? What is your loop looping over? Where's your reproducible example provided using dput()?
And more generally, have you read R FAQ 7.31 and the posting guide? Most likely either o is wrong, or there are NA values in pos, but we have no way to diagnose that. Sarah On Tue, Jul 17, 2012 at 9:55 AM, cm <bunnylove...@optonline.net> wrote: > Any reason I'd get an error like this? > > Error in if (round(pos[o + 1]) == (pos[o + 1] - 0.4)) { : > missing value where TRUE/FALSE needed > > but when i do it individually, out of the for loop, >> (round(pos[o+1])==(pos[o+1]-.4) ) > 65 > TRUE > -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ 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.