trouble with the 'exclude' parameter of factor() (PR#265)

About this list Date view Thread view Subject view Author view Other groups

Subject: trouble with the 'exclude' parameter of factor() (PR#265)
gautier@lion-ag.de
Date: Fri 03 Sep 1999 - 01:40:48 EST


Message-Id: <199909021540.RAA19224@pubhealth.ku.dk>

Full_Name: Laurent Gautier
Version: 0.65.0
OS: Irix 6.5
Submission from: (NULL) (195.110.4.98)

the following doesn't give what I expect

> test _ factor(ORGMORE[[1]],exclude=c(NA,"NOM"))
Warning message:
NAs introduced by coercion
> levels(test)
[1] "CYT" "EXC" "MEM" "NOM" "NUC" "SEC"

while this works...

> test _ factor(ORGMORE[[1]],levels=c("CYT","EXEC","MEM","NUC","SEC"),exclude=NA)
> levels(test)
[1] "CYT" "EXEC" "MEM" "NUC" "SEC"

All apologies if I misunderstood the help page for the factor() function and
this is not strange...
(I mean the results obtained, not my understanding of the help pages =) ).

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:08 EST