Learn R Programming

spatstat.random (version 3.4-5)

rpoispp3: Generate Poisson Point Pattern in Three Dimensions

Description

Generate a random three-dimensional point pattern using the homogeneous Poisson process.

Usage

rpoispp3(lambda, domain = box3(), ..., nsim=1, drop=TRUE, ex=NULL, lmax=NULL)

Value

If nsim = 1 and drop=TRUE, a point pattern in three dimensions (an object of class "pp3"). If nsim > 1, a list of such point patterns.

Arguments

lambda

Intensity of the Poisson process. A single positive number, or a function(x,y,z).

domain

Three-dimensional box in which the process should be generated. An object of class "box3".

...

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.

ex

An example point pattern (object of class "pp3") which will be used to determine the intensity lambda and the containing box domain.

lmax

Maximum possible value of the intensity function lambda, when lambda is a function.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Rolf Turner rolfturner@posteo.net.

Details

This function generates a realisation of the Poisson process in three dimensions, with intensity lambda (points per unit volume).

If lambda is a single number, the homogeneous Poisson process with constant intensity lambda is generated.

If lambda is a function with arguments x,y,z, the inhomogeneous Poisson process with intensity function lambda(x,y,z) is generated. In this case the argument lmax is required.

The realisation is generated inside the three-dimensional region domain which currently must be a rectangular box (object of class "box3").

See Also

runifpoint3, pp3, box3

Examples

Run this code
   X <- rpoispp3(50)

   rpoispp3(ex=osteo$pts[[1]])

Run the code above in your browser using DataLab