R/fitinbounds.R

fitinbounds <-
function (v, lower, upper)
{
    blob <- v
    for (st in names(v)) {
        blob[st] <- max(blob[st], lower[st])
        blob[st] <- min(blob[st], upper[st])
    }
    return(blob)
}

Try the blackbox package in your browser

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

blackbox documentation built on May 29, 2024, 1:15 a.m.