runiflpp {spatstat.linnet} | R Documentation |
Uniform Random Points on a Linear Network
Description
Generates n
random points, independently and
uniformly distributed, on a linear network.
Usage
runiflpp(n, L, nsim=1, drop=TRUE, ex=NULL)
Arguments
n |
Number of random points to generate. A nonnegative integer, or a vector of integers specifying the number of points of each type. |
L |
A linear network (object of class |
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
The specified number n
of random points is
generated with uniform distribution on the network L
.
The random points are generated using runifpointOnLines
.
If n
is an integer vector, then a multitype point pattern is
generated, with n[i]
random points of type i
.
If ex
is given, then it serves as an example for determining
n
and L
. The default value of n
will be the number of points in ex
(or the number of points of each type in ex
if it 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 a linear network
(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
rlpp
for non-uniform random points;
rpoislpp
for Poisson point process;
Examples
X <- runiflpp(10, simplenet)
plot(X)
# marked
Z <- runiflpp(c(a=10, b=3), simplenet)
# using 'ex'
U <- runiflpp(ex=Z)