R/censored.mean.R

Defines functions censored.mean

Documented in censored.mean

censored.mean <-
function(x, lower, trim = 0)
{
    x.mean <- mean(x, trim = trim)
    x.median <- median(x)
    if (isTRUE(all.equal(x.median, lower))){
        return(x.median)
    } else{
        return(x.mean)
    }
}

Try the qrnn package in your browser

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

qrnn documentation built on June 29, 2018, 5:04 p.m.