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

EventData

EventData Objects


Description

An EventData object comprises a data frame with at least three fields named EID, X, and Y; each row specifies an event that occurs at a specific point.

PBSmapping functions that expect EventData will accept properly formatted data frames in their place (see 'Details').

as.EventData attempts to coerce a data frame to an object with class EventData.

is.EventData returns TRUE if its argument is of class EventData.

Usage

as.EventData(x, projection = NULL, zone = NULL)
is.EventData(x, fullValidation = TRUE)

Arguments

x

data frame to be coerced or tested.

projection

optional projection attribute to add to EventData, possibly overwriting an existing attribute.

zone

optional zone attribute to add to EventData, possibly overwriting an existing attribute.

fullValidation

Boolean value; if TRUE, fully test x.

Details

Conceptually, an EventData object describes events (EID) that take place at specific points (X,Y) in two-dimensional space. Additional fields can specify measurements associated with these events. In a fishery context, EventData could describe fishing events associated with trawl tows, based on the fields:

  • EID - fishing event (tow) identification number;

  • X, Y - fishing location;

  • Duration - length of time for the tow;

  • Depth - average depth of the tow;

  • Catch - biomass captured.

Like PolyData, EventData can have attributes projection and zone, which may be absent. Inserting the string "EventData" as the class attribute's first element alters the behaviour of some functions, including print (if PBSprint is TRUE) and summary.

Value

The as.EventData method returns an object with classes "EventData" and "data.frame", in that order.

Author(s)

Nicholas M. Boers, Associate Professor – Computer Science
MacEwan University, Edmonton AB
Last modified Rd: 2015-04-23

See Also


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.