Skip to contents

Counts, for every occurrence record, how many of the issue codes defined in EnumOccurrenceIssue are flagged in the record's issue field. This is the second step in the VasGBIF import workflow, taking the data.table returned by import_records() as input.

The function is internal: customized_filter() calls it directly, so users never invoke it themselves.

Usage

extract_issues(occ = NA)

Arguments

occ

An "import" data.table returned by import_records(), containing at least the columns gbifID and issue. The issue column must hold raw GBIF issue codes as present in a GBIF SIMPLE_CSV download. Defaults to NA.

Value

A data.table with one row per record in occ and two columns:

  • gbifID: copied from occ to allow joining back to the original records.

  • issue_count: the number of issue codes flagged for that record.

Details

The set of recognised issue codes is taken from the package dataset EnumOccurrenceIssue. Each code is searched for in the record's issue string, and issue_count is how many of them are found. Codes not present in the dataset are ignored.

See also