From brahm@alum.mit.edu  Wed Jun 19 18:50:07 2002
From: brahm@alum.mit.edu (David Brahm)
Date: Wed, 19 Jun 2002 13:50:07 -0400
Subject: levels() counter-intuitif? (PR#1693)
In-Reply-To: <200206191658.SAA04763@pubhealth.ku.dk>
References: <200206191658.SAA04763@pubhealth.ku.dk>
Message-ID: <15632.50255.346546.580824@gargle.gargle.HOWL>

rjvbertin@hotmail.com writes:
> Suppose I have a factor size with levels "small", "medium" and "large". 
> Then, when I subset this factor:
> >ss<-size[size!="medium"]
> to get at the extremes,
> >levels(ss)
> ....
> Levels:  large medium small

Try:
  R> ss <- size[size != "medium", drop=T]
  R> levels(ss)
     [1] "large" "small"

By the way, this type of question probably belongs in R-help, not R-devel, and
you will likely get grief for submitting it as a "bug".
-- 
                              -- David Brahm (brahm@alum.mit.edu)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


levels() counter-intuitif? (PR#1693)
David Brahm