| rjitter {spatstat.geom} | R Documentation |
Applies independent random displacements to each point in a point pattern.
rjitter(X, ...) ## S3 method for class 'ppp' rjitter(X, radius, retry=TRUE, giveup = 10000, ..., nsim=1, drop=TRUE)
X |
A point pattern (object of class |
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.
Alternatively, |
retry |
What to do when a perturbed point lies outside the window
of the original point pattern. If |
giveup |
Maximum number of unsuccessful attempts. |
... |
Ignored. |
nsim |
Number of simulated realisations to be generated. |
drop |
Logical. If |
The function rjitter is generic, with methods for point
patterns (described here) and for some other types of geometrical objects.
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.
The result of rjitter.ppp is
a point pattern (an object of class "ppp")
or a list of point patterns.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.
X <- rsyst(owin(), 10, 10) Y <- rjitter(X, 0.02) plot(Y) Z <- rjitter(X)