identical.RdCompare two SpatRasters for equality.
First the attributes of the objects are compared. If these are the same, a 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 class 'SpatRaster,SpatRaster'
identical(x, y)single logical value