powered by
Pair plots of layers in a RasterStack or RasterBrick. This is a wrapper around graphics function pairs.
pairs
# S4 method for RasterStackBrick pairs(x, hist=TRUE, cor=TRUE, use="pairwise.complete.obs", maxpixels=100000, ...)
RasterBrick or RasterStack
Logical. If TRUE a histogram of the values is shown on the diagonal
Logical. If TRUE the correlation coefficient is shown in the upper panels
Argument passed to the cor function
cor
Integer. Number of pixels to sample from each layer of large Raster objects
Additional arguments (only cex and main)
cex
main
boxplot, hist, density
r <- raster(system.file("external/test.grd", package="raster") ) s <- stack(r, 1/r, sqrt(r)) pairs(s) if (FALSE) { # to make indvidual histograms: hist(r) # or scatter plots: plot(r, 1/r) }
Run the code above in your browser using DataLab