stretch | R Documentation |
Shifts and stretches the values of a vector or array to a desired interval, while maintaining the shape of the input argument
stretch(x, min = 0, max = 1, invert = FALSE, gamma = NULL, na = NULL)
x |
vector or array |
min |
minimum value |
max |
maximum value |
invert |
logical flag specifying whether the data should be inverted, such that the smallest input value maps to max and the largest input value maps to min. |
gamma |
optional argument specifying a non-linear transformation x->x^gamma, if gamma>0, or x->1-(1-x)^(-gamma), if gamma<0. |
na |
optional value specifying the value assigned to non-numbers (NA and NaN) |
vector/array of the same shape as x
Danail Obreschkow
lim
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.