trouble with the 'exclude' parameter of factor() (PR#265)
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) (

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
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: