[R] An array of an array of boxplots in lattice

2008-11-17 Thread steve
Using the data set fgl in MASS the following code layout(matrix(1:9,3,3)) for(i in 1:9){ boxplot(fgl[,i] ~ type, data = fgl,main=dimnames(fgl)[[2]][i])} produces a 3 by 3 array of plots, each one of which consists of six boxplots. Is it possible to do this in lattice? Steve R version

Re: [R] An array of an array of boxplots in lattice

2008-11-17 Thread Chuck Cleland
On 11/17/2008 1:50 PM, steve wrote: Using the data set fgl in MASS the following code layout(matrix(1:9,3,3)) for(i in 1:9){ boxplot(fgl[,i] ~ type, data = fgl,main=dimnames(fgl)[[2]][i])} produces a 3 by 3 array of plots, each one of which consists of six boxplots. Is it possible to

Re: [R] An array of an array of boxplots in lattice

2008-11-17 Thread Deepayan Sarkar
On Mon, Nov 17, 2008 at 11:15 AM, Chuck Cleland [EMAIL PROTECTED] wrote: On 11/17/2008 1:50 PM, steve wrote: Using the data set fgl in MASS the following code layout(matrix(1:9,3,3)) for(i in 1:9){ boxplot(fgl[,i] ~ type, data = fgl,main=dimnames(fgl)[[2]][i])} produces a 3 by 3 array of

Re: [R] An array of an array of boxplots in lattice

2008-11-17 Thread steve
Thank you. Here's my version, using melt instead of do.call(make.groups... library(reshape) fgl2 = melt(fgl[,-10]) fgl2$type = fgl$type bwplot(value ~ type | variable, data = fgl2) Steve Deepayan Sarkar wrote: On Mon, Nov 17, 2008 at 11:15 AM, Chuck Cleland [EMAIL PROTECTED] wrote: On

Re: [R] An array of an array of boxplots in lattice

2008-11-17 Thread hadley wickham
On Mon, Nov 17, 2008 at 3:42 PM, steve [EMAIL PROTECTED] wrote: Thank you. Here's my version, using melt instead of do.call(make.groups... library(reshape) fgl2 = melt(fgl[,-10]) fgl2$type = fgl$type bwplot(value ~ type | variable, data = fgl2) Or even more succintly: fgl2 - melt(fgl, id =