Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

reScale

Rescale a numeric vector to a specified minimum and maximum


Description

Rescale a numeric vector to a specified minimum and maximum.

Usage

reScale(x, type = "simple", to = c(0, 1), na.rm = TRUE)

Arguments

x

numeric vector to smooth.

type

what kind of rescaling to perform. Current options are 'simple' (default) and 'normal' which produces a z-score and 'custom' for which the 'to' argument must be specified.

to

numeric vector of length 2 specifying the minimum and maximum value to perform a linear rescale between (default is 0 and 1)

na.rm

Set to TRUE,this removes NAs before rescaling.

Value

A numeric vector of rescaled values.

Examples

reScale(15:200)

rcarbon

Calibration and Analysis of Radiocarbon Dates

v1.4.2
GPL (>= 2)
Authors
Andrew Bevan [aut] (<https://orcid.org/0000-0001-7967-3117>), Enrico Crema [aut, cre] (<https://orcid.org/0000-0001-6727-5138>), R. Kyle Bocinsky [ctb], Martin Hinz [ctb], Philip Riris [ctb], Fabio Silva [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.