R/trnc.R

"trnc" <-
function(y, prob) {
        if (prob > 0) {
        qs <- quantile(y, probs=prob)
        ifelse(y < qs, y, qs)
        }
        else rep(min(y), length(y))
}

Try the PROcess package in your browser

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

PROcess documentation built on Nov. 8, 2020, 5:44 p.m.