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

rsyst

Simulate systematic random point pattern


Description

Generates a “systematic random” pattern of points in a window, consisting of a grid of equally-spaced points with a random common displacement.

Usage

rsyst(win=square(1), nx=NULL, ny=nx, ..., dx=NULL, dy=dx,
       nsim=1, drop=TRUE)

Arguments

win

A window. An object of class owin, or data in any format acceptable to as.owin().

nx

Number of columns of grid points in the window. Incompatible with dx.

ny

Number of rows of grid points in the window. Incompatible with dy.

...

Ignored.

dx

Spacing of grid points in x direction. Incompatible with nx.

dy

Spacing of grid points in y direction. Incompatible with ny.

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

This function generates a “systematic random” pattern of points in the window win. The pattern consists of a rectangular grid of points with a random common displacement.

The grid spacing in the x direction is determined either by the number of columns nx or by the horizontal spacing dx. The grid spacing in the y direction is determined either by the number of rows ny or by the vertical spacing dy.

The grid is then given a random displacement (the common displacement of the grid points is a uniformly distributed random vector in the tile of dimensions dx, dy).

Some of the resulting grid points may lie outside the window win: if they do, they are deleted. The result is a point pattern inside the window win.

This function is useful in creating dummy points for quadrature schemes (see quadscheme) as well as in simulating random point patterns.

Value

A point pattern (an object of class "ppp") if nsim=1, or a list of point patterns if nsim > 1.

Author(s)

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

See Also

Examples

X <- rsyst(nx=10)
  plot(X)

  # polygonal boundary
  X <- rsyst(letterR, 5, 10)
  plot(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.