Rescales values in the interval "from" (lower, upper) to the new interval "to" (lower, upper).

rescale(x, from, to)

Arguments

x

Vector of values

from

vector, interval of which x are elements. from[1] must be the lower, from[2] the upper bound.

to

vector, interval to which the elements should be scaled. to[1] must be the lower, to[2] the upper bound.