format_scale | R Documentation |
Rescale data to have a new range.
format_scale(x, new_min = 0, new_max = 1)
x |
A numeric vector |
new_min |
A numeric single value (default = 0), that will be the new minimum value |
new_max |
A numeric single value (default = 1), that will be the new maximum value |
A numeric vector.
x <- seq(-3,3,l = 100)
range(x)
y <- format_scale(x)
range(y)
plot(x,y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.