Skip to content
Prev 308502 / 398506 Next

can't find the error in if function... maybe i'm blind?

Le samedi 20 octobre 2012 ? 03:27 -0700, Janosch a ?crit :
You could have told us what this error means in English, but my guess is
that File$X.Frame.Number[a] or File$X.Frame.Number[a + 1] is NA, which
means that the whole expression evaluates to NA, which is not corrrect
for if(). If you want NAs to be considered as FALSE, than put the
expression inside a isTRUE() call. If NAs are not expected there in your
code, there's a problem elsewhere.

Since the loop stops when the error is raised, "a" still contains the
value that produced it and you can easily check where the problem comes
from that way.


My two cents