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

LocationSet

LocationSet Objects


Description

A LocationSet comprises a data frame that summarises which EventData points (EID) lie in which PolySet polygons (PID) or (PID, SID). Events not located in target polygons are not reported. If an event lies on a polygon boundary, an additional LocationSet field called Bdry is set to TRUE. One event can also occur in multiple polygons.

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

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

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

Usage

as.LocationSet(x)
is.LocationSet(x, fullValidation = TRUE)

Arguments

x

data frame to be coerced or tested.

fullValidation

Boolean value; if TRUE, fully test x.

Details

A PolySet can define regional boundaries for drawing a map, and EventData can give event points on the map. Which events occur in which regions? Our function findPolys resolves this problem. The output lies in a LocationSet, a data frame with three or four columns (EID, PID, SID, Bdry), where SID may be missing. One row in a LocationSet means that the event EID occurs in the polygon (PID, SID). The boundary (Bdry) field specifies whether (Bdry=T) or not (Bdry=F) the event lies on the polygon boundary. If SID refers to an inner polygon boundary, then EID occurs in (PID, SID) only if Bdry=T. An event may occur in multiple polygons. Thus, the same EID can occur in multiple records. If an EID does not fall in any (PID, SID), or if it falls within a hole, it does not occur in the output LocationSet. Inserting the string "LocationSet" as the first element of a LocationSet's class attribute alters the behaviour of some functions, including print (if PBSprint is TRUE) and summary.

Value

The as.LocationSet method returns an object with classes "LocationSet" 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.