A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://rspatial.github.io/terra/reference/minmax.html below:

Get or compute the minimum and maximum cell values — extremes • terra

The minimum and maximum value of a SpatRaster are returned or computed (from a file on disk if necessary) and stored in the object.

Usage
# S4 method for class 'SpatRaster'
minmax(x, compute=FALSE)
# S4 method for class 'SpatRaster'
hasMinMax(x)
# S4 method for class 'SpatRaster'
setMinMax(x, force=FALSE)
Arguments
x

SpatRaster

compute

logical. If TRUE min and max values are computed if they are not available

force

logical. If TRUE min and max values are recomputed even if already available

Value

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

Examples
r <- rast(system.file("ex/elev.tif", package="terra"))
minmax(r)
#>     elevation
#> min       141
#> max       547

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4