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.
# S3 method for linnet
identify(x, ...)
A vector containing the serial numbers of the network segments of
x
that were identified.
A linear network
(object of class "linnet"
).
Arguments passed to identify.psp
and ultimately to
identify.default
.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.
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.
identify
,
identify.psp
,
plot.linnet
.