# Ops.msr

From spatstat v1.49-0
by Adrian Baddeley

##### Arithmetic Operations on Measures

These group generic methods for the class `"msr"`

allow the arithmetic operators
`+`

, `-`

, `*`

and `/`

to be applied
directly to measures.

##### Usage

```
## S3 methods for group generics have prototypes:
````Ops(e1, e2)`

##### Arguments

- e1, e2
objects of class

`"msr"`

.

##### Details

Arithmetic operators on a measure `A`

are only defined
in some cases. The arithmetic operator is effectively applied
to the value of `A(W)`

for every spatial domain `W`

.
If the result is a measure, then this operation is valid.

If `A`

is a measure (object of class `"msr"`

)
then the operations `-A`

and `+A`

are defined.

If `A`

and `B`

are measures,
then `A + B`

and `A - B`

are defined.
(This is implemented only when `A`

and `B`

are represented using the same quadrature scheme.)

If `A`

is a measure and `z`

is a numeric value,
then `A * z`

and `A / z`

are defined,
and `z * A`

is defined.

##### See Also

##### Examples

```
# NOT RUN {
X <- rpoispp(function(x,y) { exp(3+3*x) })
fit <- ppm(X, ~x+y)
rp <- residuals(fit, type="pearson")
rp
-rp
2 * rp
rp /2
rp - rp
rr <- residuals(fit, type="raw")
rp - rr
# }
```

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

### Community examples

Looks like there are no examples yet.