extremes | R Documentation |
The minimum and maximum value of a SpatRaster are returned or computed (from a file on disk if necessary) and stored in the object.
## S4 method for signature 'SpatRaster'
minmax(x, compute=FALSE)
## S4 method for signature 'SpatRaster'
hasMinMax(x)
## S4 method for signature 'SpatRaster'
setMinMax(x, force=FALSE)
x |
SpatRaster |
compute |
logical. If |
force |
logical. If |
minmax: numeric matrix of minimum and maximum cell values by layer
hasMinMax: logical indicating whether the min and max values are available.
setMinMax: nothing. Used for the side-effect of computing the minimum and maximum values of a SpatRaster
r <- rast(system.file("ex/elev.tif", package="terra"))
minmax(r)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.