# connected.linnet

0th

Percentile

##### Connected Components of a Linear Network

Find the topologically-connected components of a linear network.

Keywords
manip, spatial
##### Usage
# S3 method for linnet
connected(X, …, what = c("labels", "components"))
##### Arguments
X

A linear network (object of class "linnet").

Ignored.

what

Character string specifying the kind of result.

##### Details

The function connected is generic. This is the method for linear networks (objects of class "linnet").

Two vertices of the network are connected if they are joined by a path in the network. This function divides the network into subsets, such that all points in a subset are connected to each other.

If what="labels" the return value is a factor with one entry for each vertex of X, identifying which connected component the vertex belongs to.

If what="components" the return value is a list of linear networks, which are the connected components of X.

##### Value

If what="labels", a factor. If what="components", a list of linear networks.

thinNetwork

##### Aliases
• connected.linnet
##### Examples
# NOT RUN {
# remove some edges from a network to make it disconnected
plot(simplenet, col="grey", main="", lty=2)
A <- thinNetwork(simplenet, retainedges=-c(3,5))