R/normalize.R

Defines functions normalize

Documented in normalize

normalize <- function(x) {
    a <- x - min(x, na.rm=TRUE)
    return(a / max(a, na.rm=TRUE))
}

Try the preputils package in your browser

Any scripts or data that you put into this service are public.

preputils documentation built on July 1, 2020, 5:35 p.m.