[R] factor labels in model.frame

Dennis L. Malandro nawlnz at yahoo.com
Tue Apr 9 20:16:07 CEST 2002


Hmm, I rebooted my computer and now it works fine. 
How weird is that?

Thanks a lot Thomas,
Dennis


--- Thomas Lumley <tlumley at u.washington.edu> wrote:
> On Mon, 8 Apr 2002, Dennis L. Malandro wrote:
> 
> > Hello,
> >
> > model.frame changes the factor labels when
> na.action =
> > na.omit.
> >
> > > f <- gl(3, 2, 6, paste('m', 1:3, sep = ''))
> > > r <- c(NA, NA, 3:6)
> > > mf <- model.frame(~ r + f, na.action = na.omit)
> > > mf
> >   r  f
> > 3 3 m1
> > 4 4 m1
> > 5 5 m2
> > 6 6 m2
> >
> > But it seems like it should be this
> > > mf
> >   r  f
> > 3 3 m2
> > 4 4 m2
> > 5 5 m3
> > 6 6 m3
> >
> > intead.
> 
> It certainly should, and on my machine it is (both
> Linux and Win2k). I
> don't see how you can get the first answer.
> 
> 	-thomas
> 
> 
> 


__________________________________________________



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