Learn R Programming

spatstat.random (version 3.4-4)

Random Generation Functionality for the 'spatstat' Family

Description

Functionality for random generation of spatial data in the 'spatstat' family of packages. Generates random spatial patterns of points according to many simple rules (complete spatial randomness, Poisson, binomial, random grid, systematic, cell), randomised alteration of patterns (thinning, random shift, jittering), simulated realisations of random point processes including simple sequential inhibition, Matern inhibition models, Neyman-Scott cluster processes (using direct, Brix-Kendall, or hybrid algorithms), log-Gaussian Cox processes, product shot noise cluster processes and Gibbs point processes (using Metropolis-Hastings birth-death-shift algorithm, alternating Gibbs sampler, or coupling-from-the-past perfect simulation). Also generates random spatial patterns of line segments, random tessellations, and random images (random noise, random mosaics). Excludes random generation on a linear network, which is covered by the separate package 'spatstat.linnet'.

Copy Link

Version

Install

install.packages('spatstat.random')

Monthly Downloads

78,361

Version

3.4-4

License

GPL (>= 2)

Maintainer

Adrian Baddeley

Last Published

January 21st, 2026

Functions in spatstat.random (3.4-4)

rCauchy

Simulate Neyman-Scott Point Process with Cauchy cluster kernel
is.stationary

Recognise Stationary and Poisson Point Process Models
gauss.hermite

Gauss-Hermite Quadrature Approximation to Expectation for Normal Distribution
rGRFgauss

Simulate a Gaussian Random Field
quadratresample

Resample a Point Pattern by Resampling Quadrats
expand.owin

Apply Expansion Rule
rDGS

Perfect Simulation of the Diggle-Gates-Stibbard Process
rGaussPoisson

Simulate Gauss-Poisson Process
rDiggleGratton

Perfect Simulation of the Diggle-Gratton Process
rHardcore

Perfect Simulation of the Hardcore Process
rPenttinen

Perfect Simulation of the Penttinen Process
rMosaicField

Mosaic Random Field
rNeymanScott

Simulate Neyman-Scott Process
rPSNCP

Simulate Product Shot-noise Cox Process
rMosaicSet

Mosaic Random Set
rMaternII

Simulate Matern Model II
rMatClust

Simulate Matern Cluster Process
rMaternI

Simulate Matern Model I
rPoissonCluster

Simulate Poisson Cluster Process
rLGCP

Simulate Log-Gaussian Cox Process
ragsAreaInter

Alternating Gibbs Sampler for Area-Interaction Process
rcellnumber

Generate Random Numbers of Points for Cell Process
rThomas

Simulate Thomas Process
rags

Alternating Gibbs Sampler for Multitype Point Processes
rStraussHard

Perfect Simulation of the Strauss-Hardcore Process
rVarGamma

Simulate Neyman-Scott Point Process with Variance Gamma cluster kernel
ragsMultiHard

Alternating Gibbs Sampler for Multitype Hard Core Process
rSSI

Simulate Simple Sequential Inhibition
rcell

Simulate Baddeley-Silverman Cell Process
rStrauss

Perfect Simulation of the Strauss Process
rclusterBKBC

Simulate Cluster Process using Brix-Kendall Algorithm or Modifications
recipEnzpois

First Reciprocal Moment of the Truncated Poisson Distribution
rmh

Simulate point patterns using the Metropolis-Hastings algorithm.
rknn

Theoretical Distribution of Nearest Neighbour Distance
rmhcontrol

Set Control Parameters for Metropolis-Hastings Algorithm.
rlabel

Random Re-Labelling of Point Pattern
rjitter.psp

Random Perturbation of Line Segment Pattern
rmh.default

Simulate Point Process Models using the Metropolis-Hastings Algorithm.
rmhexpand

Specify Simulation Window or Expansion Rule
reach

Interaction Distance of a Point Process Model
rmpoint

Generate N Random Multitype Points
rpoislinetess

Poisson Line Tessellation
rmpoispp

Generate Multitype Poisson Point Pattern
rmhmodel

Define Point Process Model for Metropolis-Hastings Simulation.
rpoisline

Generate Poisson Random Line Process
rmhmodel.default

Build Point Process Model for Metropolis-Hastings Simulation.
rnoise

Random Pixel Noise
rmhstart

Determine Initial State for Metropolis-Hastings Simulation.
rpoint

Generate N Random Points
rmhmodel.list

Define Point Process Model for Metropolis-Hastings Simulation.
rshift

Random Shift
rpoispp

Generate Poisson Point Pattern
rshift.ppp

Randomly Shift a Point Pattern
rpoispp3

Generate Poisson Point Pattern in Three Dimensions
rshift.splitppp

Randomly Shift a List of Point Patterns
rshift.psp

Randomly Shift a Line Segment Pattern
rstrat

Simulate Stratified Random Point Pattern
rpoisppx

Generate Poisson Point Pattern in Any Dimensions
rpoistrunc

Random Values from the Truncated Poisson Distribution
rpoisppOnLines

Generate Poisson Point Pattern on Line Segments
spatstat.random-internal

Internal spatstat.random functions
runifpoint3

Generate N Uniform Random Points in Three Dimensions
runifpoint

Generate N Uniform Random Points
rtemper

Simulated Annealing or Simulated Tempering for Gibbs Point Processes
runifpointOnLines

Generate N Uniform Random Points On Line Segments
rthin

Random Thinning
runifpointx

Generate N Uniform Random Points in Any Dimensions
spatstat.random-package

The spatstat.random Package
runifdisc

Generate N Uniform Random Points in a Disc
update.rmhcontrol

Update Control Parameters of Metropolis-Hastings Algorithm
rthinclumps

Random Thinning of Clumps
will.expand

Test Expansion Rule
dpakes

Pakes distribution
domain.rmhmodel

Extract the Domain of any Spatial Object
clusterfield

Field of clusters
clusterkernel

Extract Cluster Offspring Kernel
clusterradius

Compute or Extract Effective Range of Cluster Kernel
as.owin.rmhmodel

Convert Data To Class owin
dmixpois

Mixed Poisson Distribution
default.expand

Default Expansion Rule for Simulation of Model
Window.rmhmodel

Extract Window of Spatial Object
default.rmhcontrol

Set Default Control Parameters for Metropolis-Hastings Algorithm.