Ted Harding wrote: > > One is that "NA" is not a value. Its logical status is, > in effect, "value not known". Therefore, when 'y' is "NA", > "x==y" cannot have a definite resolution, since it is > possible for the unkown value of 'y' to be equal to the > value of 'x'; and equally possible that it may not be. > Hence the value of "x==y" is itself "NA". Similarly > the value of "x==y" is "NA" when both of 'x' and 'y' > are "NA". The function to use for testing whether (say) > 'x' is "NA" is is.na(x). > Just as an off-topic tangent, I found it quite interesting that real-world language Aymara (see ... http://en.wikipedia.org/wiki/Aymara_language ...) uses this three value logic system (I think the computer jargon is "trollean logic").
Alberto Monteiro ______________________________________________ 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.