compareRaster | R Documentation |
Evaluate whether a two or more Raster* objects have the same extent, number of rows and columns, projection, resolution, and origin (or a subset of these comparisons).
all.equal is a wrapper around compareRaster with options values=TRUE
, stopiffalse=FALSE
and showwarning=TRUE
.
compareRaster(x, ..., extent=TRUE, rowcol=TRUE, crs=TRUE, res=FALSE, orig=FALSE,
rotation=TRUE, values=FALSE, tolerance, stopiffalse=TRUE, showwarning=FALSE)
x |
Raster* object |
... |
Raster* objects |
extent |
logical. If |
rowcol |
logical. If |
crs |
logical. If |
res |
logical. If |
orig |
logical. If |
rotation |
logical. If |
values |
logical. If |
tolerance |
numeric between 0 and 0.5. If not supplied, the default value is used (see |
stopiffalse |
logical. If |
showwarning |
logical. If |
r1 <- raster()
r2 <- r1
r3 <- r1
compareRaster(r1, r2, r3)
nrow(r3) <- 10
# compareRaster(r1, r3)
compareRaster(r1, r3, stopiffalse=FALSE)
compareRaster(r1, r3, rowcol=FALSE)
all.equal(r1, r2)
all.equal(r1, r3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.