Re: [R] Clustered boxplots

From: Chuck Cleland <ccleland_at_optonline.net>
Date: Tue 28 Jun 2005 - 01:16:26 EST

You might consider bwplot() in the lattice package instead. For example:

mydata <- data.frame(Y = rnorm(3*1000),

                      INDFACT =rep(c("A", "B", "C"), each=1000),
                      CLUSFACT=factor(rep(c("M","F"), 1500)))

library(lattice)
trellis.device(new=FALSE, col=FALSE)

bwplot(Y ~ INDFACT | CLUSFACT, data=mydata, layout=c(2,1))

ftorrei2@uiuc.edu wrote:
> Hello,
>
> Is there a way to obtain clustered boxplots similar to the
> ones provided by SPSS? I have a dependent variable (y axis),
> an independent factor (which I intend to represent with
> different colors, no help needed here) and a grouping factor
> for the clusters (which I donīt know how to display) I would
> like to leave a bigger space between the boxplots of each
> cluster than between teh boxplots within each of them, and I
> would also like to add labels below each cluster. Then I will
> add a legend for the colors representing the independent
> factor (this is something I can do, no help needed here). I
> would appreciate any hint pointing me in the right direction.
>
> Francisco
> Francisco Torreira
> Spanish, Italian and Portuguese
> Univ. of Illinois at Urbana-Champaign
> 707 South Mathews Aven.
> 4031 FLB
> Urbana, IL, 61801
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Jun 28 01:22:02 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:03 EST