R/scale01.R

"scale01" <-
    function (x, xrange) 
{
    if (missing(xrange)) {
        minx <- min(x)
        ranx <- max(x) - minx
    }
    else {
        minx <- xrange[1]
        ranx <- diff(xrange)
    }
    (x - minx)/ranx
}

Try the gravy package in your browser

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

gravy documentation built on May 2, 2019, 4:46 p.m.