Delete some vertices and/or segments from a linear network or related object.
thinNetwork(X, retainvertices, retainedges)
A linear network (object of class
Optional. Subset index specifying which vertices should be retained (not deleted).
Optional. Subset index specifying which edges (segments) should be retained (not deleted).
This function deletes some of the vertices and edges (segments) in the linear network.
retainedges can be
any kind of subset index: a vector of positive integers specifying which
vertices/edges should be retained; a vector of negative integers
specifying which vertices/edges should be deleted; or a logical vector
specifying whether each vertex/edge should be retained (
or deleted (
Vertices are indexed in the same sequence as in
Segments are indexed in the same sequence as in
retainedges has higher precedence than
retainvertices in the sense that:
retainedges is given, then
any vertex which is an endpoint of a retained edge will also be
retainvertices is given and
retainedges is missing,
then any segment joining two retained vertices will also be retained.
Thus, when both
given, it is possible that more vertices will be retained than those
After the network has been altered, other consequential changes will
occur, including renumbering of the segments and vertices.
X is a point pattern on a linear network, then data points
will be deleted if they lie on a deleted edge.
An object of the same kind as
and Suman Rakshit.
linnet to make a network;
connected.linnet to extract connected components.
1 2 3 4 5