make_scale: Rescale Vector to Arbitrary Minimum and Maximum
Description
make_scale() will rescale any vector to have a user-defined minimum and maximum.
Usage
make_scale(x, minim, maxim)
Value
The function takes a numeric vector and returns a rescaled version of it with the observed (desired) minimum, the observed (desired)
maximum, and rescaled values between both extremes.
Arguments
x
a numeric vector
minim
a desired numeric minimum
maxim
a desired numeric maximum
Details
This function is useful if you wanted to do some kind of minimum-maximum rescaling of a variable
on some given scale, prominently rescaling to a minimum of 0 and a maximum of 1 (thinking ahead to a regression).
The function is flexible enough for any minimum or maximum.