Learn R Programming

tsensembler (version 0.0.5)

normalize: Scale a numeric vector using max-min

Description

Utility function used to linearly normalize a numeric vector

Usage

normalize(x, ...)

Arguments

x

a numeric vector.

...

Further arguments to min and max function (e.g. na.rm = TRUE)

Value

a linearly normalized vector

Examples

Run this code
# NOT RUN {
normalize(rnorm(4L))
normalize(1:10)
normalize(c(1,2,NA,4), na.rm = TRUE)

# }

Run the code above in your browser using DataLab