R/qvector.R

Defines functions `qvector`

`qvector` <-
function(x, probs = seq(0, 1, 0.25), na.rm = FALSE, ...)
{
nrun <- length(probs)-1
qa <- quantile(x, probs, na.rm = na.rm, ...)
out <- rep(probs[2], length(x))
for (i in 2:nrun)
    out[which(x > qa[i] & x <= qa[(i+1)])] <- probs[(i+1)]
return(out)
}

Try the mefa package in your browser

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

mefa documentation built on May 2, 2019, 5 p.m.