Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

normalize01

normalization for mixed colors


Description

Normalize numbers -> [0, 1]

Usage

normalize01(x, ...)

## S4 method for signature 'matrix'
normalize01(x, tolerance = hy.getOption("tolerance"))

## S4 method for signature 'numeric'
normalize01(x, tolerance = hy.getOption("tolerance"))

## S4 method for signature 'hyperSpec'
normalize01(x, ...)

Arguments

x

vector with values to transform

...

additional parameters such as tolerance handed down.

tolerance

tolerance level for determining what is 0 and 1

Details

The input x is mapped to [0, 1] by subtracting the minimum and subsequently dividing by the maximum. If all elements of x are equal, 1 is returned.

Value

vector with x values mapped to the interval [0, 1]

Author(s)

C. Beleites

See Also


hyperSpec

Work with Hyperspectral Data, i.e. Spectra + Meta Information (Spatial, Time, Concentration, ...)

v0.100.0
GPL (>= 3)
Authors
Claudia Beleites [aut, cre, dtc] (<https://orcid.org/0000-0003-1626-154X>), Valter Sergo [aut], Alois Bonifacio [ctb, dtc], Marcel Dahms [ctb], Björn Egert [ctb], Simon Fuller [ctb], Vilmantas Gegzna [ctb], Rustam Guliev [ctb], Bryan A. Hanson [ctb], Michael Hermes [ctb], Martin Kammer [dtc], Roman Kiselev [ctb], Sebastian Mellor [ctb]
Initial release
2021-09-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.