Learn R Programming

spatstat.linnet (version 3.2-2)

rjitter.lpp: Random Perturbation of a Point Pattern on a Network

Description

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

Usage

# S3 method for lpp
rjitter(X, radius, ..., nsim = 1, drop = TRUE)

Value

A point pattern on a linear network (object of class "lpp") or a list of such point patterns.

Arguments

X

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

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.

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.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.

Details

The function rjitter is generic. This function is the method for the class "lpp" of point patterns on a linear network.

Each of the points in X will be displaced along the network by a random amount, independently of other points. The maximum displacement distance is specified by radius. Each point remains on the same line segment of the network as it originally was.

See Also

rjitter for point patterns in two dimensions.

Examples

Run this code
   X <- runiflpp(3, simplenet)
   plot(X, pch=16)
   Y <- rjitter(X, 0.1)
   plot(Y, add=TRUE, cols=3)

Run the code above in your browser using DataLab