SciencesPo (version 1.3.8)

new.range: Scale data to an arbitrary range.

Description

Scale data to a new range. Arguments include the data, the new minimum, and the new maximum values.

Usage

new.range(x, new.min = 0, new.max = 1)

Arguments

x
The data vector.
new.min
An integer for the minimun value for the range.
new.max
An integer for the maximun value for the range.

See Also

svTransform, normalize

Examples

Run this code
x <- sample(10)
new.range(x, 0, 1)

Run the code above in your browser using DataCamp Workspace