[R] Questions about bwplot
Charilaos Skiadas
skiadas at hanover.edu
Mon May 21 16:11:39 CEST 2007
On May 21, 2007, at 8:39 AM, Klaus Nordhausen wrote:
> Dear R-experts,
>
> I have some questions about boxplots with lattice.
> My data is similar as in the example below, I have two factors
> (Goodness of Fit and Algorithms) and data values but in each panels
> the scales are quite different, therefore the normal boxplots
> produced by
>
> set.seed(1)
> GOF <- factor(rep(c("GOF1","GOF2","GOF3"),each=40))
> Alg <- rep(factor(rep(c("A1","A2","A3","R1"),each=10)),3)
> Value <- c(runif(40),rnorm(40),rnorm(30,10,3),rnorm(10,20,3))
> test.data <- data.frame(Alg=Alg,GOF=GOF,Value=Value)
>
> library(lattice)
> bwplot(Value ~ Alg | GOF, data = test.data, as.table=T, layout=c(1,3))
>
> are not very informative.
>
> Then I used
>
> bwplot(Value ~ Alg | GOF, data = test.data, scale=list
> (relation="free"), as.table=T, layout=c(1,3))
>
> from which my first question arises:
>
> Is it possible to have no vertical space between the panels though
> they have different y-scales when using the
> argument scale=list(relation="free")?
Try this:
bwplot(Value ~ Alg | GOF, data = test.data, scale=list(y=list
(relation="free")), as.table=T, layout=c(1,3))
Sorry, don't have any thoughts about your other two questions off the
top of my head.
Haris Skiadas
Department of Mathematics and Computer Science
Hanover College
More information about the R-help
mailing list