lin_rescale | R Documentation |
Rescale numeric values from 0 to 1 to a specified interval.
lin_rescale(x, left, right)
x |
A numeric vector. |
left, right |
The lower and upper boundaries for rescaled interval. |
Values smaller than 0 or larger than 1 are rescaled to values linearly extrapolated from the specified interval.
A vector with the same length as x
.
lin_rescale(0.4, left = 100, right = 200)
lin_rescale(c(-2,0.3,0.6,10), left = -10, right = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.