Extract.linim

0th

Percentile

Extract Subset of Pixel Image on Linear Network

Extract a subset of a pixel image on a linear network.

Keywords
manip, spatial
Usage
# S3 method for linim
[(x, i, ...)
Arguments
x

A pixel image on a linear network (object of class "linim").

i

Spatial window defining the subregion. Either a spatial window (an object of class "owin"), or a logical-valued pixel image, or a point pattern (an object of class "ppp"), or any type of index that applies to a matrix, or something that can be converted to a point pattern by as.ppp (using the window of x).

Ignored.

Details

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.

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. Pixels outside the domain of x have value NA.

Value

Another pixel image on a linear network (object of class "linim") or a vector of pixel values.

Aliases
  • [.linim
Examples
# NOT RUN {
  M <- as.mask.psp(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))]
# }
Documentation reproduced from package spatstat, version 1.49-0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.