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

Ops.msr

Arithmetic Operations on Measures


Description

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 with the same dimension (i.e. both are scalar-valued, or both are k-dimensional vector-valued) then A + B and A - B are defined.

If A is a measure and z is a numeric value, then A * z and A / z are defined, and z * A is defined.

Value

Another measure (object of class "msr").

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

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

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.