normalize | R Documentation |
Normalize numeric and raster data.
normalize(r, mn = NULL, mx = NULL, force_range = FALSE)
r |
SpatRaster or numeric vector. |
mn |
Numeric vector of length one. Minimum expected value. Default is
equivalent to enter the minimum value from |
mx |
Numeric vector of length one. Maximum expected value. Default is
equivalent to enter the maximum value from |
force_range |
Logical vector of length one. If it is |
Normalize data laying between mn
and mx
to the range 0
to 1
. Data greater than mx
get values greater than 1
in
a proportional fashion. Conversely, data less than mn
get values less
than 0
.This function can be used for linear stretching of the
histogram.
An object from the same class as r
with values from r
linearly rescaled to make mn
equal to zero and mx
equal to
one. Therefore, if mn
and mx
do not match the actual minimum
and maximum from r
, then the output will not cover the 0-to-1 range
and may be outside that range if force_range
is set to FALSE
.
Other Pre-processing Functions:
enhance_caim()
,
gbc()
,
local_fuzzy_thresholding()
,
membership_to_color()
normalize(read_caim())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.