[R] help: combine multiple 'pairs plots'

Richard M. Heiberger rmh at temple.edu
Thu Oct 15 20:15:22 CEST 2009


Jesse Poland wrote:
> I would like to combine multiple pairs plots (each one being a matrix 
> of correlation plots) into a single graphic. I have tried the par() 
> function, which works well to combine several simple graphs. However, 
> the pairs() graph seems to override the par() function and produce an 
> new plot, rather than combining the plots into a single graphic.
This looks like a job for splom in lattice.

library(lattice)
tmp <- cbind(environmental, group=rep(1:2, length=111))
splom( ~ tmp[,1:4] | tmp$group)




More information about the R-help mailing list