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

rjitter

Random Perturbation of a Point Pattern


Description

Applies independent random displacements to each point in a point pattern.

Usage

rjitter(X, radius, retry=TRUE, giveup = 10000, ..., nsim=1, drop=TRUE)

Arguments

X

A point pattern (object of class "ppp").

radius

Scale of perturbations. A positive numerical value. The displacement vectors will be uniformly distributed in a circle of this radius. There is a sensible default.

retry

What to do when a perturbed point lies outside the window of the original point pattern. If retry=FALSE, the point will be lost; if retry=TRUE, the algorithm will try again.

giveup

Maximum number of unsuccessful attempts.

...

Ignored.

nsim

Number of simulated realisations to be generated.

drop

Logical. If nsim=1 and drop=TRUE (the default), the result will be a point pattern, rather than a list containing a point pattern.

Details

Each of the points in the point pattern X is subjected to an independent random displacement. The displacement vectors are uniformly distributed in a circle of radius radius.

If a displaced point lies outside the window, then if retry=FALSE the point will be lost.

However if retry=TRUE, the algorithm will try again: each time a perturbed point lies outside the window, the algorithm will reject it and generate another proposed perturbation of the original point, until one lies inside the window, or until giveup unsuccessful attempts have been made. In the latter case, any unresolved points will be included without any perturbation. The return value will always be a point pattern with the same number of points as X.

Value

A point pattern (an object of class "ppp") if nsim=1, or a list of point patterns if nsim > 1, in the same window as X.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

Examples

X <- rsyst(owin(), 10, 10)
   Y <- rjitter(X, 0.02)
   plot(Y)
   Z <- rjitter(X)

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

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