Hi, this may be a too simple question, but I was not able to find how to do it. So when I boxplot two vectors, i.e. x<-rbind(1,2,3,4) y<-rbind(3,4,5,6) boxplot(x,y) , could somebody tell me how to name the two boxes as apple and banana? Thanks much, Haun __________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Haun Jung wrote:> > Hi, this may be a too simple question, but I was not > able to find how to do it.Well, it's not so hard R> help(boxplot) tells you about the argument names: group labels which will be printed under each boxplot. Set that to apple and banana... Z> So when I boxplot two vectors, i.e. > x<-rbind(1,2,3,4) > y<-rbind(3,4,5,6) > boxplot(x,y) > > , could somebody tell me how to name the two boxes as > apple and banana? > > Thanks much, > Haun > > __________________________________________________ > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Haun Jung <haun_jung at yahoo.com> writes:> Hi, this may be a too simple question, but I was not > able to find how to do it. > > So when I boxplot two vectors, i.e. > x<-rbind(1,2,3,4) > y<-rbind(3,4,5,6) > boxplot(x,y) > > , could somebody tell me how to name the two boxes as > apple and banana?The easiest would seem to be boxplot(list(apple=x,banana=y)) -- 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 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._