Last chance! 50% off unlimited learning
Sale ends in
Join the specified vertices in a linear network, creating a new network.
joinVertices(L, from, to)
A linear network (object of class "linnet"
)
or point pattern on a linear network (object of class "lpp"
).
Integers, or integer vectors of equal length,
specifying the vertices which should be joined.
Alternatively from
can be a 2-column matrix of integers
and to
is missing or NULL
.
A linear network (object of class "linnet"
)
or point pattern on a linear network (object of class "lpp"
).
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.
# NOT RUN {
snet <- joinVertices(simplenet, 4, 8)
plot(solist(simplenet, snet), main="")
X <- runiflpp(3, simplenet)
Y <- joinVertices(X, 4, 8)
# }
Run the code above in your browser using DataLab