Learn R Programming

AtmRay (version 1.31)

RESCALE: Rescale a vector to fit in a certain range

Description

Rescale a vector to fit in a certain range

Usage

RESCALE(x, nx1, nx2, minx, maxx)

Arguments

x
vector
nx1
new minimum
nx2
new maximum
minx
old min
maxx
old max

Value

scale vector is returned

Details

Used for graphics.

Examples

Run this code
x = rnorm(10)
RESCALE(x, 3, 9, min(x), max(x) )

Run the code above in your browser using DataLab