Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

locateEvents

Locate Events on the Current Plot


Description

Locate events on the current plot (using the locator function).

Usage

locateEvents (EID, n = 512, type = "p", ...)

Arguments

EID

vector of event IDs (optional).

n

maximum number of events to locate.

type

one of "n", "p", "l", or "o". If "p" or "o", then the points are plotted; if "l" or "o", then the points are joined by lines.

...

additional par parameters for the locator function.

Details

This function allows its user to define events with mouse clicks on the current plot via the locator function. The arguments n and type are the usual parameters of the locator function. If EID is not missing, then n = length(EID).

On exit from locator, suppose the user defined m events. If EID was missing, then the output data frame will contain m events. However, if EID exists, then the output data frame will contain length(EID) events, and both X and Y will be NA for events EID[(m+1):n]. The na.omit function can remove rows with NAs.

Value

EventData with columns EID, X, and Y, and projection attribute equal to the map's projection. The function does not set the zone attribute.

Author(s)

Nicholas M. Boers, Associate Professor – Computer Science
MacEwan University, Edmonton AB
Last modified Rd: 2007-06-06

See Also

Examples

#--- define five events on the current plot, numbering them 10 to 14
## Not run: events <- locateEvents(EID = 10:14)

PBSmapping

Mapping Fisheries Data and Spatial Analysis Tools

v2.73.0
GPL (>= 2)
Authors
Jon T. Schnute [aut], Nicholas Boers [aut], Rowan Haigh [aut, cre], Alex Couture-Beil [ctb], Denis Chabot [ctb], Chris Grandin [ctb], Angus Johnson [ctb], Paul Wessel [ctb], Franklin Antonio [ctb], Nicholas J. Lewin-Koh [ctb], Roger Bivand [ctb]
Initial release
2021-01-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.