rjitter.psp: Random Perturbation of Line Segment Pattern

View source: R/randomseg.R

rjitter.pspR Documentation

Random Perturbation of Line Segment Pattern

Description

Randomly pertubs a spatial pattern of line segments by applying independent random displacements to the segment endpoints.

Usage

## S3 method for class 'psp'
rjitter(X, radius, ..., clip=TRUE, nsim=1, drop=TRUE)

Arguments

X

A point pattern on a linear network (object of class "psp").

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 nsim=1 and drop=TRUE (the default), the result will be a spatial pattern of line segments (class "psp") rather than a list of length 1 containing this pattern.

Details

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.

Value

A spatial pattern of line segments (object of class "psp") or a list of such patterns.

Author(s)

\spatstatAuthors

.

See Also

rjitter for point patterns in two dimensions.

Examples

   E <- edges(letterR)
   Window(E) <- owin(c(1.9, 4.1), c(0.5, 3.5))
   plot(rjitter(E, 0.1))

spatstat.random documentation built on Oct. 22, 2023, 1:17 a.m.