rescale_variable | R Documentation |
Rescales a given numeric vector to be bounded between two specified values.
rescale_variable(x, a, b)
x |
A numeric vector. |
a |
The lower bound of the new scale. |
b |
The upper bound of the new scale. |
A numeric vector rescaled to be within a, b.
data <- c(1, 2, 3, 4, 5)
rescale_variable(data, 0, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.