rpoislpp {spatstat.linnet} | R Documentation |
Poisson Point Process on a Linear Network
Description
Generates a realisation of the Poisson point process with specified intensity on the given linear network.
Usage
rpoislpp(lambda, L, ..., nsim=1, drop=TRUE, ex=NULL)
Arguments
lambda |
Intensity of the Poisson process.
A single number, a |
L |
A linear network (object of class |
... |
Arguments passed to |
nsim |
Number of simulated realisations to generate. |
drop |
Logical value indicating what to do when |
ex |
Optional. A point pattern on a network
(object of class |
Details
A random number of random points is generated on the network L
,
according to a Poisson point process
with intensity lambda
points per unit length.
The random points are generated by rpoisppOnLines
.
See the help file for rpoisppOnLines
for information.
Argument L
can be omitted, and defaults to as.linnet(lambda)
,
when lambda
is a function on a linear network (class
"linfun"
) or a pixel image on a linear network
("linim"
).
If ex
is given, then it serves as an example for determining
lambda
and L
. The default value of lambda
will be the average intensity (number per unit length) of points in
ex
(or the average intensity of the points of each type
if ex
is multitype). The default value of L
will be
the network on which ex
is defined.
Value
If nsim = 1
and drop=TRUE
,
a point pattern on the linear network,
i.e.\ an object of class "lpp"
.
Otherwise, a list of such point patterns.
Author(s)
Ang Qi Wei aqw07398@hotmail.com and Adrian Baddeley Adrian.Baddeley@curtin.edu.au
See Also
rpoisppOnLines
,
runiflpp
,
rlpp
,
lpp
,
linnet
.
Examples
X <- rpoislpp(5, simplenet)
plot(X)
# multitype
Y <- rpoislpp(c(a=5, b=5), simplenet)
# using argument 'ex' to make a pattern like 'X'
Z <- rpoislpp(ex=X)