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

gautier@lion-ag.de gautier@lion-ag.de
Thu, 2 Sep 1999 17:40:48 +0200 (MET DST)


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._