R/prescale.R

Defines functions prescale

Documented in prescale

# data scaling
prescale <-
function(xv)
{
     ## cat("data vector length: ", length(xv),"\n")
     ## xv <- sort(xv) # ! WITH SORT ?
     minxv <- min(xv)
     maxxv <- max(xv)
     x <- (xv-minxv) / (maxxv- minxv)
     invisible(x)
}

Try the dpmixsim package in your browser

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

dpmixsim documentation built on May 2, 2019, 5:45 p.m.