Last data update: 2014.03.03

R: Rescale a vector to fit in a certain range
RESCALER Documentation

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

Details

Used for graphics.

Value

scale vector is returned

Author(s)

Jonathan M. Lees<jonathan.lees.edu>

Examples

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(AtmRay)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/AtmRay/RESCALE.Rd_%03d_medium.png", width=480, height=480)
> ### Name: RESCALE
> ### Title: Rescale a vector to fit in a certain range
> ### Aliases: RESCALE
> ### Keywords: misc
> 
> ### ** Examples
> 
> x = rnorm(10)
> RESCALE(x, 3, 9, min(x), max(x) )
 [1] 3.284323 5.408516 3.000000 5.627982 3.438004 9.000000 5.621980 7.602825
 [9] 7.025104 3.189639
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>