rescaler | R Documentation |
Rescale a numeric vector to have specified maximum and minimum; modified from the scales package.
rescaler(x, to = c(0, 1), from = range(x, na.rm = TRUE))
x |
numeric vector of values |
to |
output range (numeric vector of length two) |
from |
input range (numeric vector of length two); if not given,
|
rescale
; zero_range
rescaler(1:5, to = c(0, 1))
rescaler(1:5, to = c(0, 100))
rescaler(5, to = c(0, 100), from = c(0, 25))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.