R/squeeze2.R

Defines functions squeeze2

squeeze2 <- function(x, bounds = c(min(x), max(x))){

    unders <- length(x[x < bounds[1]])
    overs <- length(x[x > bounds[2]])
    x[x < bounds[1]] <- stats::runif(unders, min = bounds[1], max = bounds[2])
    x[x > bounds[2]] <- stats::runif(overs, min = bounds[1], max = bounds[2])
    return(x)
}

Try the BayesGWQS package in your browser

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

BayesGWQS documentation built on Jan. 21, 2022, 1:09 a.m.