View source: R/normalize_minmax.R
normalize_minmax | R Documentation |
Rescale numeric or raster data from an expected range to the range [0, 1]
.
normalize_minmax(r, mn = NULL, mx = NULL, clip = FALSE)
r |
numeric terra::SpatRaster or numeric vector. Input data. |
mn |
numeric vector of length one or |
mx |
numeric vector of length one or |
clip |
logical vector of length one. If |
Same properties as r
, with values rescaled to the range [0, 1]
if
mn
and mx
match the range of r
or extend beyond it. If clip = TRUE
,
values will be within [0, 1]
even if this implies data loss.
normalize_minmax(read_caim())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.