[R] lda in R vs S

Marc R. Feldesman feldesmanm at pdx.edu
Fri May 7 03:18:15 CEST 1999

This file was dumped directly from S-Plus.  This is what I get if I use the
levels() function from within R.  Nothing untoward there that I can see.

 [7] "BERG"     "BURIAT"   "BUSHMAN"  "DOGON"    "EASTER I" "EGYPT"   
[13] "ESKIMO"   "GUAM"     "HAINAN"   "MOKAPU"   "MORIORI"  "N JAPAN" 
[19] "N MAORI"  "NORSE"    "PERU"     "PHILLIPI" "S JAPAN"  "S MAORI" 

At 01:45 AM 5/7/1999 +0200, Peter Dalgaard BSA wrote:
>"Marc R. Feldesman" <feldesmanm at pdx.edu> writes:
>> No actually I *had* a factor.
>> is.factor(sarich.na[,3])
>> [1] TRUE
>> > 
>> This is why I was perplexed by the behavior after Brian suggested the
>> various alternatives.
>Strange things may happen if the "factor" class gets set by unorthodox
>means. E.g.:
>> d<-letters[1:3]
>> class(d)<-"factor"
>> d
>> unclass(d)
>[1] "a" "b" "c"
>> is.factor(d)   
>[1] TRUE
>> factor(d)
>Error: invalid labels argument in "factor"
>Another possibility is that it is the indexing in itself that is
>confusing the model formula parsing code. Perhaps it may work to put
>in I(sarich.na[,3])?
>   O__  ---- Peter Dalgaard             Blegdamsvej 3  
>  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
> (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
>~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907

Dr. Marc R. Feldesman
email:  feldesmanm at pdx.edu
email:  feldesman at ibm.net
fax:    503-725-3905

"Math is hard.  Let's go to the mall"  Barbie

Powered by:  Monstrochoerus - the 300 MHz Pentium II
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