R/qlnorm3.R

qlnorm3 <-
function (p, meanlog = 0, sdlog = 1, threshold = 0) 
{
    q <- qlnorm(p = p, meanlog = meanlog, sdlog = sdlog)
    lq <- length(q)
    q <- q + (threshold <- rep(threshold, len = lq))
    if (any(index <- rep(p, length = lq) == 0 & !is.na(q))) 
        q[index] <- threshold[index]
    if (!is.null(Names <- names(p))) 
        names(q) <- rep(Names, length = lq)
    q
}

Try the EnvStats package in your browser

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

EnvStats documentation built on Sept. 11, 2024, 6:03 p.m.