Learn R Programming

spatstat.explore (version 3.2-5)

integral.fv: Compute Integral of Function Object

Description

Compute the integral of a function over a specified range.

Usage

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

Value

A single numerical value, or a numeric vector.

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.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au.

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.

See Also

fv.object, integral

stieltjes

Examples

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

Run the code above in your browser using DataLab