integral.fv: Compute Integral of Function Object

View source: R/fv.R

integral.fvR Documentation

Compute Integral of Function Object

Description

Compute the integral of a function over a specified range.

Usage

## S3 method for class 'fv'
integral(f, domain = NULL, ...)

Arguments

f

A function value table (object of class "fv").

domain

Optional. Range of values of the argument x over which the density f(x) should be integrated. A numeric vector of length 2 giving the minimum and maximum values of x. Infinite limits are permitted.

...

Ignored.

Details

This is a method for the generic function integral. It computes the numerical integral

I = \int f(x) dx

of the function object f. If domain is specified, the integral is restricted to the interval of x values given by the domain.

The result is a numeric value or numeric vector containing one entry for each column of function values in f.

Integrals are calculated numerically using the trapezoidal rule restricted to the domain given.

Value

A single numerical value, or a numeric vector.

Author(s)

\adrian

.

See Also

fv.object, integral

stieltjes

Examples

  g <- pcf(redwood, divisor="d")
  integral(g, domain=c(0, 0.1))

spatstat.explore documentation built on Oct. 22, 2024, 9:07 a.m.