Add a sampling, collection or image-capture Event to a tibble
use_events.Rd
Format fields that contain information about an Event. An "Event" in Darwin Core standard refers to an action that occurs at a place and time. Examples include:
A specimen collecting event
A survey or sampling event
A camera trap image capture
A marine trawl
A camera trap deployment event
A camera trap burst image event (with many images for one observation)
In practice this is no different from using mutate()
, but gives some
informative errors, and serves as a useful lookup for fields in
the Darwin Core Standard.
Usage
use_events(
.df,
eventID = NULL,
eventType = NULL,
parentEventID = NULL,
.keep = "unused",
.keep_composite = "all"
)
Arguments
- .df
a
data.frame
ortibble
that the column should be appended to.- eventID
A unique identifier for an individual Event.
- eventType
The type of Event
- parentEventID
The parent event under which one or more Events sit within.
- .keep
Control which columns from
.df
are retained in the output. Note that unlikedplyr::mutate()
, which defaults to"all"
this defaults to"unused"
; i.e. only keeps Darwin Core fields, and not those fields used to generate them.- .keep_composite
Control which columns from
.df
are kept whencomposite_id()
is used to assign values toeventID
, defaulting to"all"
. This has a different default from.keep
because composite identifiers often contain information that is valuable in other contexts, meaning that deleting these columns by default is typically unwise.
Details
Each Event requires a unique eventID
and eventType
(because there can
be several types of Events in a single dataset), along with a
parentEventID
which specifies the level under which the current Event sits
(e.g., An individual location's survey event ID, which is one of several
survey locations on a specific day's set of surveys ie the parentEvent).
Examples of eventID
values:
INBO:VIS:Ev:00009375
Examples of eventType
values:
Sample
Observation
Survey
Site Visit
Deployment
See more examples on dwc.tdwg.org
Examples of parentEventID
A1
(To identify the parent event in nested samples, each with their own eventID
- A1_1
, A1_2
)