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

integral.msr

Integral of a Measure


Description

Computes the integral (total value) of a measure over its domain.

Usage

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

Arguments

f

A signed measure or vector-valued measure (object of class "msr").

domain

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

...

Ignored.

Details

The integral (total value of the measure over its domain) 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.

For a multitype measure m, use split.msr to separate the contributions for each type of point, as shown in the Examples.

Value

A numeric value, vector, or matrix.

integral(f) returns a numeric value (for a signed measure) or a vector of values (for a vector-valued measure).

If domain is a tessellation then integral(f, domain) returns a numeric vector with one entry for each tile (if f is a signed measure) or a numeric matrix with one row for each tile (if f is a vector-valued measure).

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

fit <- ppm(cells ~ x)
   rr <- residuals(fit)
   integral(rr)

   # vector-valued measure
   rs <- residuals(fit, type="score")
   integral(rs)

   # multitype
   fitA <- ppm(amacrine ~ x)
   rrA <- residuals(fitA)
   sapply(split(rrA), integral)

   # multitype and vector-valued
   rsA <- residuals(fitA, type="score")
   sapply(split(rsA), integral)

   ## integral over a subregion
   integral(rr, domain=square(0.5))
   ## integrals over the tiles of a tessellation
   integral(rr, domain=quadrats(cells, 2))

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

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