rescale: Rescale numeric vector

View source: R/computation.R

rescaleR Documentation

Rescale numeric vector

Description

Rescale numeric vector

Usage

rescale(x, from = range(x, na.rm = TRUE, finite = TRUE), to = c(0, 1))

Arguments

x

A numeric vector.

from

The range of the original data.

to

The range of the rescaled data.

Value

A numeric vector with rescaled values.

Examples

x <- rnorm(10)
rescale(x)
rescale(x, from = c(0, 1))
rescale(x, to = c(0, 2))

thisutils documentation built on July 3, 2025, 9:09 a.m.