RESCALE {RPMG} | R Documentation |
Rescale a vector to fit in a certain range
Description
Rescale a vector to fit in a certain range
Usage
RESCALE(x, nx1=0, nx2=1, minx=0, maxx=1)
Arguments
x |
vector |
nx1 |
new minimum |
nx2 |
new maximum |
minx |
old min |
maxx |
old max |
Details
Rescaling a vector, mostly used for graphics. If x does not vary, i.e. it is constant or minx and max are identical, the mean value of nx1 and nx2 is returned.
Value
Scale version of x vector is returned.
Author(s)
Jonathan M. Lees<jonathan.lees.edu>
Examples
x = rnorm(10)
RESCALE(x, 3, 9, min(x), max(x) )
[Package RPMG version 2.2-7 Index]