map01 | R Documentation |
Rescale a numeric vector in such a way that all values lie within a specified range (per default 0 to 1).
map01(x, min = 0, max = 1, omin = min(x), omax = max(x), na.rm = FALSE)
x |
a numeric vector |
min |
a numeric vector of length one |
max |
a numeric vector of length one |
omin |
a numeric vector of length one |
omax |
a numeric vector of length one |
na.rm |
logical |
Maps the elements of a numeric vector to a specified range; default is 0 to 1.
a numeric vector
Enrico Schumann
scale
map01(0:10) ## 0, 0.1, 0.2 ... 1.0
map01(0:10, 0, 100) ## 0, 10, 20 ... 100
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.