Extract a subset of a linear network.
## S3 method for class 'linnet' x[i, ..., snip=TRUE]
A linear network (object of class
Spatial window defining the subregion.
An object of class
This function computes the intersection
between the linear network
x and the domain specified by
This function is a method for the subset operator
linear networks (objects of class
"linnet"). It is provided
mainly for completeness.
i should be a window.
snip specifies what to do with segments of
which cross the boundary of
snip=FALSE, such segments are simply deleted.
snip=TRUE (the default), such segments are cut into pieces by the
i, and those pieces which lie inside the window
i are included in the resulting network.
Another linear network (object of class
, \rolf, \ege and Suman Rakshit.
p <- par(mfrow=c(1,2), mar=0.2+c(0,0,1,0)) B <- owin(c(0.1,0.7),c(0.19,0.6)) plot(simplenet, main="x[w, snip=TRUE]") plot(simplenet[B], add=TRUE, col="green", lwd=3) plot(B, add=TRUE, border="red", lty=3) plot(simplenet, main="x[w, snip=FALSE]") plot(simplenet[B, snip=FALSE], add=TRUE, col="green", lwd=3) plot(B, add=TRUE, border="red", lty=3) par(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.