Given a line segment pattern, generate a random point pattern
n points uniformly distributed on the
runifpointOnLines(n, L, nsim=1)
Number of points to generate.
Line segment pattern (object of class
Number of simulated realisations to be generated.
This command generates a point pattern consisting of
independent random points, each point uniformly distributed on
the line segment pattern. This means that, for each random point,
the probability of falling on a particular segment is proportional to the length of the segment; and
given that the point falls on a particular segment, it has uniform probability density along that segment.
n is a single integer, the result is an unmarked point
n is a vector of integers, the result is a marked point
m different types of points, where
m = length(n),
in which there are
n[j] points of type
nsim = 1,
a point pattern (object of class
"ppp") with the same
nsim > 1, a list of point patterns.
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.