scale2: Function to linearly scale a vector of numbers (x) to be...

Description Usage Arguments Author(s) Examples

Description

Function to linearly scale a vector of numbers (x) to be between min and max.

Usage

1
scale2(x, min, max)

Arguments

x

a numeric vector

min

the minimum of the new range

max

the maximum of the new range

Author(s)

Mark Cowley, 31 Oct 2005

Examples

1
2
3
options(digits=2)
scale2(1:10,0,1)
# [1] 0.00 0.11 0.22 0.33 0.44 0.56 0.67 0.78 0.89 1.00

drmjc/mjcbase documentation built on May 15, 2019, 2:27 p.m.