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)
vector/array of the same shape as x
vector or array
minimum value
maximum value
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.
optional argument specifying a non-linear transformation x->x^gamma, if gamma>0, or x->1-(1-x)^(-gamma), if gamma<0.
optional value specifying the value assigned to non-numbers (NA and NaN)
Danail Obreschkow
lim