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.

normalize01(x, ...)

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

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

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

Arguments

x

Object (e.g., vector) with values to transform.

...

additional parameters such as tolerance handed down.

tolerance

Tolerance level for determining what is 0 and 1.

Value

object (e.g., vector) with x values mapped to the interval [0, 1].

See also

Author

C. Beleites