scale2 | R Documentation |
The function scales numeric objects to specific ranges.
scale2(x, lower = -1.5, upper = 1.5)
x |
Numeric, vector or matrix. |
lower |
The upper range. |
upper |
The lower range. |
A scaled numeric vector or matrix, scaled to the range provided in lower
and upper
.
set.seed(123)
x <- runif(5)
scale2(x, -1, 1)
scale2(x, 0, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.