Given require(raster) require(sp) require(gridExtra) f <- system.file("external/test.grd", package="raster") r <- raster(f) p1 <- spplot(r) p2 <- spplot(r)
I would like to plot the equivalent to grid.arrange(p1,p2,ncol=1,nrow=2) but keeping the trellis objects p1 and p2 within one single object (as in practice I have many objects generated within a for() loop). The following used to work: ps <- c(p1,p2) grid.arrange(ps,ncol=1,nrow=2) but does not work any more. How should I combine p1 and p2 into one single object that would be accepted by grid.arrange? Thanks -- Agustin Lobo aloboa...@gmail.com ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.