| distbdry.lpp | R Documentation |
For a point pattern on a linear network, compute the distance from each point to the nearest terminal vertex of the network.
## S3 method for class 'lpp'
distbdry(X)
X |
A point pattern on a linear network (class |
This function computes the distance from each data point X[i]
to the nearest terminal vertex of the network.
A terminal vertex is a vertex
which is the endpoint of exactly one segment of the network.
Distance is measured by the length of the shortest path in the network.
The function distbdry is generic, with methods for
class "ppp", "pp3", "lpp" and other classes.
A numeric vector with one entry for each point of X.
.
distbdry
X <- if(interactive()) chicago else spiders
b <- distbdry(X)
plot(X %mark% b, main=expression(distbdry(X)),
pch=16, size=1, cols=topo.colors(128))
L <- domain(X)
V <- vertices(L)
d <- vertexdegree(L)
Terminal <- V[d == 1]
points(Terminal, pch=2, col="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.