Description Usage Arguments Value Examples
A function for rescaling a vector of integers or real numbers to an arbitrary interval. Element in the original vector with the minimum value will be transformed to a number deteremined by lower
argument (zero by default), while the element with the maximum value will be transformed to a number deteremined by upper
argument (one by default). All other elements will be rescaled proportionally.
1 |
x |
A numeric vector where numbers need to be rescaled. |
lower |
Desired minimum value, by deafult set to 0. |
upper |
Desired maximum value, by deafult set to 1. |
na.rm |
A logical that indicates whether NA elements should be removed from the output or not. By default set to FALSE. Note that, if it is set to FALSE, the rescale will still remove NA's to do the computations, but it will simply leave the NA elements in the resulting vector. |
A numeric vector with rescaled elements from x
.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.