Learn R Programming

spatstat (version 1.31-3)

Extract.linnet: Extract Subset of Linear Network

Description

Extract a subset of a linear network.

Usage

## S3 method for class 'linnet':
[(x, i, \dots)

Arguments

x
A linear network (object of class "linnet").
i
Spatial window defining the subregion. An object of class "owin".
...
Ignored.

Value

  • Another linear network (object of class "linnet").

Details

This function computes the intersection between the linear network x and the domain specified by i. This function is a method for the subset operator "[" for linear networks (objects of class "linnet"). It is provided mainly for completeness.

The index i should be a window.

Examples

Run this code
plot(simplenet)
  B <- owin(c(0,1),c(0.2,0.5))
  plot(simplenet[B], add=TRUE, col="red")
  plot(B, add=TRUE, border="green")

Run the code above in your browser using DataLab