Description Usage Arguments Value Examples
Rescale a numeric variable
1 | rescale_var(x, new_min = 0, new_max = 1, x_min = min(x), x_max = max(x))
|
x |
a numeric vector |
new_min |
The minimum value of the output |
new_max |
The maximum value of the output |
x_min |
The lowest possible value in x. By default this is the actual lowest value in x. |
x_max |
The highest possible value in x. By default this is the actual highest value in x. |
a numeric vector
1 2 | rescale_var(1:10)
rescale_var(1:10, new_min = -1, new_max = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.