rjitter.psp | R Documentation |
Randomly pertubs a spatial pattern of line segments by applying independent random displacements to the segment endpoints.
## S3 method for class 'psp'
rjitter(X, radius, ..., clip=TRUE, nsim=1, drop=TRUE)
X |
A point pattern on a linear network
(object of class |
radius |
Scale of perturbations. A positive numerical value. Each point will be displaced by a random distance, with maximum displacement equal to this value. |
... |
Ignored. |
clip |
Logical value specifying what to do if segments cross the boundary of the window. See Details. |
nsim |
Number of simulated realisations to be generated. |
drop |
Logical. If |
The function rjitter
is generic. This function is
the method for the class "psp"
of line segment patterns.
Each of the endpoints of each segment in X
will be
subjected to an independent random displacement. The displacement vectors are
uniformly distributed in a circle of radius radius
.
If clip=TRUE
(the default), segment endpoints
are permitted to move to locations slightly outside the window of X
,
and the resulting segments will be clipped to the window.
If clip=FALSE
, segment endpoints are conditioned to fall
inside the window.
If nsim=1
and drop=TRUE
, the result is another
spatial pattern of line segments (object of class "psp"
).
Otherwise, the result is a list of nsim
line segment patterns.
A spatial pattern of line segments
(object of class "psp"
)
or a list of such patterns.
.
rjitter
for point patterns in two dimensions.
E <- edges(letterR)
Window(E) <- owin(c(1.9, 4.1), c(0.5, 3.5))
plot(rjitter(E, 0.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.