Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

runiflpp

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)

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 "linnet", see linnet).

nsim

Number of simulated realisations to generate.

drop

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.

Details

This function uses runifpointOnLines to generate the random points.

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

rlpp for non-uniform random points; rpoislpp for Poisson point process;

Examples

data(simplenet)
   X <- runiflpp(10, simplenet)
   plot(X)
  # marked
   Z <- runiflpp(c(a=10, b=3), simplenet)

spatstat.linnet

Linear Networks Functionality of the 'spatstat' Family

v2.1-1
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Ottmar Cronie [ctb], Tilman Davies [ctb], Greg McSwiggan [ctb], Suman Rakshit [ctb]
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.