relat | R Documentation |
Maps the elements of a numeric vector to the interval [0:1].
relat(x, na.rm = FALSE, default = 1, default.na = NaN)
x |
numeric vector. |
na.rm |
logical. Should NaNs be removed from |
default |
numeric. The default value(s) to use when all values in
|
default.na |
numeric. As default, but applied if minimal or maximal
value are NaN. Not applicable if |
The relativized vector α, such that x = (1-α)\min(x) + α\max(x) holds w.r.t. floating point inaccuracies.
relat(1:3) relat(c(NaN, 2, 3, 4)) relat(c(NaN, 2, 3, 4), na.rm = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.