Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

integral.linim

Integral on a Linear Network


Description

Computes the integral (total value) of a function or pixel image over a linear network.

Usage

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

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

Arguments

f

A pixel image on a linear network (class "linim") or a function on a linear network (class "linfun").

domain

Optional window specifying the domain of integration. Alternatively a tessellation.

...

Ignored.

delta

Optional. The step length (in coordinate units) for computing the approximate integral. A single positive number.

Details

The integral (total value of the function over the network) is calculated.

If domain is a window (class "owin") then the integration will be restricted to this window. If domain is a tessellation (class "tess") then the integral of f in each tile of domain will be computed.

Value

A single numeric or complex value (or a vector of such values if domain is a tessellation).

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also

Examples

# make some data
  xcoord <- linfun(function(x,y,seg,tp) { x }, simplenet)
  integral(xcoord)
  X <- as.linim(xcoord)
  integral(X)

  # integrals inside each tile of a tessellation
  A <- quadrats(Frame(simplenet), 3)
  integral(X, A)

spatstat.linnet

Linear Networks Functionality of the 'spatstat' Family

v2.1-1
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Ottmar Cronie [ctb], Tilman Davies [ctb], Greg McSwiggan [ctb], Suman Rakshit [ctb]
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.