R/moment.R

Defines functions moment

Documented in moment

#' Moment function
#'
#' @param ... all arguments passed to moment_f()
#'
#' @return moment
#' @export
#'
#' @examples
moment <- function(...) {
  int_f <- function(x) moment_f(x,...)
  stats::integrate(int_f, -Inf, Inf, abs.tol = 0)$value
}

Try the pmxcv package in your browser

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

pmxcv documentation built on May 29, 2024, 7:28 a.m.