[R] conflicting results on NA in a qda predicted object:

Agustin Lobo alobo at ija.csic.es
Thu Dec 20 11:22:22 CET 2001


Dear list,

(I've not upgraded to R1.4 yet)

I have the following $class component in a predict.qda object:
> unique(mod23S.qda.pred$class)
 [1] 12 17 8  10 4  9  5  13 14 19 20 15 6  3  7  1  23 11 18 21 16 2  22 NA
Levels:  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

Nevertheless, when I try to identify the individual(s) with NA, I get:
> any(is.na(mod23S.qda.pred$class))
[1] FALSE

and

> mod23S.qda.pred$class[is.na(mod23S.qda.pred$class)]
factor(0)
Levels:  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 

So, actually, is there a NA value in mod23S.qda.pred$class or not?

(screening by eye it`s impossible:
length(mod23S.qda.pred$class) is 26375 )

Agus

Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list