## you may need to ## install.packages("HH") library(HH) tmp <- data.frame(y=rnorm(500), g=rep.int(c("A", "B", "C", "D"), 125), a=factor(rbinom(500, 1, .5))) bwplot(y ~ g | a, data=tmp) bwplot(y ~ a | g, data=tmp)
tmp$ga <- with(tmp, interaction(a, g)) position(tmp$ga) <- c(1.1, 1.9, 3.1, 3.9, 5.1, 5.9, 7.1, 7.9) bwplot(y ~ ga, data=tmp, panel=panel.bwplot.intermediate.hh, col=c(1,1,2,2,3,3,4,4), main="This is what you asked for") ## I normally want this in context interaction2wt(y ~ a + g, data=tmp) interaction2wt(y ~ a + g, data=tmp, simple=TRUE) position(tmp$a) <- c(1.5, 3.5) interaction2wt(y ~ a + g, data=tmp, simple=TRUE) interaction2wt(y ~ a + g, data=tmp, simple=TRUE, simple.scale=list(a=.2, g=.4), sub="upper-right panel is what you asked for") ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.