R/dilog.R

dilog <-
function (x, ...) 
{
    if (!is.vector(x, mode = "numeric") || length(x) != 1 || 
        !is.finite(x) || x <= 1) 
        stop("'x' must be a finite numeric scalar larger than 1")
    integrate(function(y) log(y)/(y - 1), lower = 1, upper = x, 
        ...)$value
}

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.