Learn R Programming

spatstat.explore (version 3.7-0)

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, ...)

Arguments

Value

A single numerical value, or a numeric vector.

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