View source: R/Transformations.R View source: R/Scale.R
range01 | R Documentation |
This function converts a numeric vector to a range of 0 to 1 by linearly scaling the values between the minimum and maximum of the input vector.
Scales the range of input to be between 0 and 1
range01(x, MaxN = NULL, MinN = NULL)
range01(x, MaxN = NULL, MinN = NULL)
x |
a numerical vector |
MaxN |
set Max value; NULL default find max(x) |
MinN |
set Min value; NULL default find min(x) |
Numeric vector scaled to range of 0 to 1.
A numeric vector
x <- c(2, 5, 9, 11, 14)
range01(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.