rescale {thisutils} | R 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))
[Package thisutils version 0.0.7 Index]