MapToInterval: Map numbers to interval

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/MapToInterval.r

Description

Maps a range of numbers to a given interval

Usage

1
MapToInterval(nums, start = 1, stop = 10)

Arguments

nums

The vector of numbers to be mapped

start

The start of the interval

stop

The end of the interval

Details

formula: a + (x - min(x)) * (b - a) / (max(x) - min(x))

Value

The original numbers mapped to the given interval

Author(s)

Jared P. Lander www.jaredlander.com

See Also

mapping

Examples

1
2
MapToInterval(1:10, start=0, stop=1)
mapping(1:10, start=0, stop=1)

useful documentation built on June 7, 2017, 9:02 a.m.