minmax | R Documentation |
Min-Max normalize a value within a given range
minmax(x, min = NA, max = NA)
x |
numeric. Value to be transformed (normalized). |
min |
numeric. Minimum value of range. Default NA, use the min of the supplied vector |
max |
numeric. Maximum value of range. Default NA, use the max of the supplied vector |
Normalized value (0-1) of x in the range given by min, max.
minmax(c(0, 1, 10, 100))
# Use a scale outside of the range of x
minmax(c(0, 1, 10, 100), min = 0, max = 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.