Learn R Programming

forceR (version 1.0.20)

rescale_to_range: Scale data series to new minimum and maximum

Description

Maps a series of numeric values to a new range defined by minimum (from) and maximum (to).

Usage

rescale_to_range(data, from, to)

Value

numeric vector with scaled data

Arguments

data

numeric vector containing the data to be scaled

from

minimum of new range

to

maximum of new range

Examples

Run this code
rescale_to_range(data = 1:10,
                  from = 1,
                  to = 100)

Run the code above in your browser using DataLab