The range01
function rescales a vector to the range [0, 1].
Examples
# Rescale a vector to the range [0, 1]
x <- c(1, 2, 3, 4, 5)
range01(x)
#> [1] 0.00 0.25 0.50 0.75 1.00
The range01
function rescales a vector to the range [0, 1].
# Rescale a vector to the range [0, 1]
x <- c(1, 2, 3, 4, 5)
range01(x)
#> [1] 0.00 0.25 0.50 0.75 1.00