View source: R/linnetsurgery.R
joinVertices | R Documentation |
Join the specified vertices in a linear network, creating a new network.
joinVertices(L, from, to, marks=NULL)
L |
A linear network (object of class |
from , to |
Integers, or integer vectors of equal length,
specifying the vertices which should be joined.
Alternatively |
marks |
Optional vector or data frame of values associated with the new edges. |
Vertices of the network are numbered by their order of appearance
in the point pattern vertices(L)
.
If from
and to
are single integers, then the
pair of vertices numbered from
and to
will be
joined to make a new segment of the network.
If from
and to
are vectors of integers, then
vertex from[i]
will be joined to vertex to[i]
for
each i = 1,2,..
.
If L
is a network (class "linnet"
), the result is
another network, created by adding new segments.
If L
is a point pattern on a network (class "lpp"
), the
result is another point pattern object, created by adding new segments to
the underlying network, and retaining the points.
In the resulting object, the new line segments are appended to the existing list of line segments.
A linear network (object of class "linnet"
)
or point pattern on a linear network (object of class "lpp"
).
.
linnet
, methods.linnet
,
thinNetwork
snet <- joinVertices(simplenet, 4, 8)
plot(solist(simplenet, snet), main="")
X <- runiflpp(3, simplenet)
Y <- joinVertices(X, 4, 8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.