LocationSet | R Documentation |
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.
as.LocationSet(x)
is.LocationSet(x, fullValidation = TRUE)
x |
data frame to be coerced or tested. |
fullValidation |
Boolean value; if |
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
.
The as.LocationSet
method returns an object with classes
"LocationSet"
and "data.frame"
, in that order.
Nicholas M. Boers, Staff Software Engineer
Jobber, Edmonton AB
Last modified Rd: 2015-04-23
PolySet, PolyData, EventData
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.