Generates a realisation of the Poisson point process with specified intensity on the given linear network.
rpoislpp(lambda, L, …, nsim=1, drop=TRUE)
Intensity of the Poisson process.
A single number, a function(x,y)
, a pixel image
(object of class "im"
), or a vector of numbers,
a list of functions, or a list of images.
A linear network (object of class "linnet"
,
see linnet
).
Can be omitted in some cases: see Details.
Arguments passed to rpoisppOnLines
.
Number of simulated realisations to generate.
Logical value indicating what to do when nsim=1
.
If drop=TRUE
(the default), the result is a point pattern.
If drop=FALSE
, the result is a list with one entry which is a
point pattern.
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.
This function uses rpoisppOnLines
to generate the random points.
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"
).
# NOT RUN {
X <- rpoislpp(5, simplenet)
plot(X)
# multitype
X <- rpoislpp(c(a=5, b=5), simplenet)
# }
Run the code above in your browser using DataLab