View source: R/MapToInterval.r
MapToInterval | R Documentation |
Maps a range of numbers to a given interval
MapToInterval(nums, start = 1, stop = 10)
nums |
The vector of numbers to be mapped |
start |
The start of the interval |
stop |
The end of the interval |
formula: a + (x - min(x)) * (b - a) / (max(x) - min(x))
The original numbers mapped to the given interval
Jared P. Lander www.jaredlander.com
mapping
MapToInterval(1:10, start=0, stop=1)
mapping(1:10, start=0, stop=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.