Finds the topologically-connected components of a point pattern on a linear network, when all pairs of points closer than a threshold distance are joined.
A linear network (object of class
Threshold distance. Pairs of points will be joined together
if they are closer than
connected is generic. This is the method for
point patterns on a linear network (objects of class
It divides the point pattern
X into one or more groups of points.
R=Inf (the default), then
X is divided into groups
such that any pair of points in the same group
can be joined by a path in the network.
R is a finite number, then two points of
declared to be R-close if they lie closer than
R units apart, measured by the length of the shortest path in the
network. Two points are R-connected if they
can be reached by a series of steps between R-close pairs of
X is divided into groups such that
any pair of points in the same group is R-connected.
dismantle=TRUE (the default) the algorithm first checks
whether the network is connected (i.e. whether any pair of vertices
can be joined by a path in the network), and if not, the network is
decomposed into its connected components.
A point pattern (of class
"lpp") with marks indicating the
grouping, or a list of such point patterns.
1 2 3 4 5 6 7 8 9 10 11 12 13
## behaviour like connected.ppp U <- runiflpp(20, simplenet) plot(connected(U, 0.15, dismantle=FALSE)) ## behaviour like connected.owin ## remove some edges from a network to make it disconnected plot(simplenet, col="grey", main="", lty=2) A <- thinNetwork(simplenet, retainedges=-c(3,5)) plot(A, add=TRUE, lwd=2) X <- runiflpp(10, A) ## find the connected components cX <- connected(X) plot(cX[], add=TRUE, col="blue", lwd=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.