| identical | R Documentation |
When, comparing two SpatRasters for equality, first the attributes of the objects are compared. If these are the same, the raster cells are compared as well. This can be time consuming, and you may prefer to use a sample instead with all.equal
## S4 method for signature 'SpatRaster,SpatRaster'
identical(x, y)
## S4 method for signature 'SpatVector,SpatVector'
identical(x, y)
## S4 method for signature 'SpatExtent,SpatExtent'
identical(x, y)
x |
SpatRaster, SpatVector, or SpatExtent |
y |
object of the same class as |
single logical value
all.equal, compareGeom
x <- sqrt(1:100)
mat <- matrix(x, 10, 10)
r1 <- rast(nrows=10, ncols=10, xmin=0, vals = x)
r2 <- rast(nrows=10, ncols=10, xmin=0, vals = t(mat))
identical(r1, r2)
identical(r1, r1*1)
identical(rast(r1), rast(r2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.