rescale_vector {spatialRF} | R Documentation |
Rescales a numeric vector into a new range
Description
Rescales a numeric vector to a new range.
Usage
rescale_vector(
x = NULL,
new.min = 0,
new.max = 1,
integer = FALSE
)
Arguments
x |
Numeric vector. Default: |
new.min |
New minimum value. Default: |
new.max |
New maximum value. Default: |
integer |
Logical, if |
Value
A numeric vector of the same length as x, but with its values rescaled between new.min
and new.max.
Examples
if(interactive()){
out <- rescale_vector(
x = rnorm(100),
new.min = 0,
new.max = 100,
integer = TRUE
)
out
}
[Package spatialRF version 1.1.4 Index]