accepted_terms: Select support functions

occurrence_termsR Documentation

Select support functions

Description

When creating a Darwin Core archive, it is often useful to select only those fields that conform to the standard. These functions provide a vector of terms that can be used in combination with dplyr::select() and dplyr::any_of() to quickly select Darwin Core terms for the relevant data type (events, occurrences, media).

Usage

occurrence_terms()

event_terms()

Value

A vector of accepted (but not mandatory) values for that use case.

See Also

basisOfRecord_values() or countryCode_values() for valid entries within a field.

Examples

# Return a vector of accepted terms in an Occurrence-based dataset
occurrence_terms() |> head(10L) # first 10 terms

# Use this vector to filter a data frame
df <- tibble::tibble(
  name = c("Crinia Signifera", "Crinia Signifera", "Litoria peronii"),
  latitude = c(-35.27, -35.24, -35.83),
  longitude = c(149.33, 149.34, 149.34),
  eventDate = c("2010-10-14", "2010-10-14", "2010-10-14"),
  measurement1 = c(24.3, 24.9, 20.1), # example measurement column
  measurement2 = c(0.92, 1.03, 1.09)  # example measurement column
  )

df |>
  dplyr::select(any_of(occurrence_terms()))


corella documentation built on April 4, 2025, 12:20 a.m.