rescale_to_range: Scale data series to new minimum and maximum

View source: R/general.R

rescale_to_rangeR Documentation

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)

Arguments

data

numeric vector containing the data to be scaled

from

minimum of new range

to

maximum of new range

Value

numeric vector with scaled data

Examples

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

forceR documentation built on March 7, 2023, 7:15 p.m.