rescale_var {tokenbrowser} | R Documentation |
Rescale a numeric variable
Description
Rescale a numeric variable
Usage
rescale_var(x, new_min = 0, new_max = 1, x_min = min(x), x_max = max(x))
Arguments
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. |
Value
a numeric vector
Examples
rescale_var(1:10)
rescale_var(1:10, new_min = -1, new_max = 1)
[Package tokenbrowser version 0.1.5 Index]