R/integrateDens.R

Defines functions integrateDens

Documented in integrateDens

integrateDens <- function(densFn = "norm", lower = -Inf, upper = Inf,
                          subdivisions = 100, ...){
    ## Uses code from distCheck by Diethelm Wuertz, modified by David Scott

    ## CALL <- match.call()
    dfun <- match.fun(paste0("d", densFn))
    ## Integrate density over range
    ## and return 'totalPr' :
    integrate(dfun, lower = lower, upper = upper,
              subdivisions = subdivisions,
              stop.on.error = FALSE, ...)
}

Try the DistributionUtils package in your browser

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

DistributionUtils documentation built on Aug. 28, 2023, 5:06 p.m.