rescale | R Documentation |
Re-range some numbers to stretch them so that they fit a scale from a to b
rescale(x, a = 0, b = 1, na.rm = T)
x |
A numerical vector |
a |
New minimum for the scale (numeric) |
b |
New maximum for the scale (numeric) |
na.rm |
Whether to remove NAs or not (default = TRUE) |
A stretched version of x that goes from a to b
rescale(1:10, 1, 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.