| Extract.linim | R Documentation |
Extract a subset of a pixel image on a linear network.
## S3 method for class 'linim'
x[i, ..., drop=TRUE]
x |
A pixel image on a linear network (object of class |
i |
Spatial window defining the subregion.
Either a spatial window (an object of class |
... |
Additional arguments passed to |
drop |
Logical value indicating whether |
This function is a method for the subset operator "[" for
pixel images on linear networks (objects of class "linim").
The pixel image x will be restricted to the
domain specified by i.
Pixels outside the domain of x are assigned the value NA;
if drop=TRUE (the default) such NA values are deleted
from the result; if drop=FALSE, then NA values are retained.
If i is a window (or a logical-valued pixel image)
then x[i] is another pixel image of class "linim",
representing the restriction of x to the spatial domain
specified by i.
If i is a point pattern, then x[i] is the vector of
pixel values of x at the locations specified by i.
Another pixel image on a linear network (object of class "linim")
or a vector of pixel values.
thinNetwork to extract the data
lying on selected edges of the network.
linim to make a pixel image on a network.
M <- psp2mask(as.psp(simplenet))
Z <- as.im(function(x,y){x}, W=M)
Y <- linim(simplenet, Z)
X <- runiflpp(4, simplenet)
Y[X]
Y[square(c(0.3, 0.6))]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.