identify.linnet: Interactively Identify Segments of a Linear Network

View source: R/linnet.R

identify.linnetR Documentation

Interactively Identify Segments of a Linear Network

Description

If a linear network is plotted in the graphics window, then each time the left mouse button is pressed, this function will find the network segment which is closest the mouse position, and print its serial number.

Usage

  ## S3 method for class 'linnet'
identify(x, ...)

Arguments

x

A linear network (object of class "linnet").

...

Arguments passed to identify.psp and ultimately to identify.default.

Details

This is a method for the generic function identify for linear networks.

The network x should first be plotted using plot.linnet, plot.lpp or plot.linim. Then identify(x) reads the position of the graphics pointer each time the left mouse button is pressed. It then determines which network segment lies closest to the mouse position. The index of this segment (and its mark if any) will be returned as part of the value of the call.

Each time a segment is identified, text will be displayed at the midpoint of the segment, showing its serial number.

Value

A vector containing the serial numbers of the network segments of x that were identified.

Author(s)

\spatstatAuthors

.

See Also

identify, identify.psp, plot.linnet.


spatstat/spatstat.linnet documentation built on June 1, 2025, 6:17 p.m.