[Probably an R-Sig-geo question...]
On Fri, Sep 6, 2013 at 3:57 PM, philippe massicotte <pmassico...@hotmail.com> wrote: > Hi everyone. > > I would like to know if it is possible to combine rasters in R to form a > "collage". > > For example, I would like to place 2 copies of the R logo side by side. > > > r = raster(system.file("external/rlogo.grd", package = "raster")) Convert to matrix, cbind, convert to raster: r2 = raster(cbind(as.matrix(r),as.matrix(r))) plot(r2) If you want to preserve the x and y scale somehow then you need to think about exactly where you are putting the second r and set xmx, ymx xmn, ymn when you construct the new raster. Barry ______________________________________________ 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.