# integral.msr

From spatstat v1.49-0
by Adrian Baddeley

##### Integral of a Measure

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

##### Usage

```
# S3 method for 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 (for a signed measure) or a vector of values (for a vector-valued measure).

##### See Also

##### Examples

```
# NOT RUN {
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)
# }
```

*Documentation reproduced from package spatstat, version 1.49-0, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.