This function flags records with an informed basis of records (i.e., the records type, for example, a specimen, a human observation, or a fossil specimen) not interpretable, which does not comply with Darwin Core vocabulary, or unreliable or unsuitable for specific analyses.

bdc_basisOfRecords_notStandard(
  data,
  basisOfRecord = "basisOfRecord",
  names_to_keep = "all"
)

Arguments

data

data.frame. Containing information about the basis of records.

basisOfRecord

character string. The column name with information about basis of records. Default = "basisOfRecord".

names_to_keep

character string. Elements of the column BasisOfRecords to keep. Default is "all", which considers a selected list of recommended standard Darwin Core classes (and their spelling variations, see details). By default, records missing (i.e., NA) or with "unknown" information about basis of records are kept.

Value

A data.frame containing the column ".basisOfRecords_notStandard" .Compliant (TRUE) if 'basisOfRecord' is standard; otherwise "FALSE".

Details

Users are encourage to select the set of basis of records classes to keep. Default = c("Event","HUMAN_OBSERVATION", "HumanObservation", "LIVING_SPECIMEN", "LivingSpecimen", "MACHINE_OBSERVATION", "MachineObservation", "MATERIAL_SAMPLE", "O", "Occurrence", "MaterialSample", "OBSERVATION", "Preserved Specimen", "PRESERVED_SPECIMEN", "preservedspecimen Specimen", "Preservedspecimen", "PreservedSpecimen", "preservedspecimen", "S", "Specimen", "Taxon", "UNKNOWN", "", NA)

Examples

x <- data.frame(basisOfRecord = c(
  "FOSSIL_SPECIMEN", "UNKNOWN",
  "RON", NA, "Specimen", "PRESERVED_SPECIMEN"
))

bdc_basisOfRecords_notStandard(
  data = x, 
  basisOfRecord = "basisOfRecord",
  names_to_keep = "all"
)
#> 
#> bdc_basisOfRecords_notStandard:
#> Flagged 2 of the following specific nature:
#>  c("FOSSIL_SPECIMEN", "RON") 
#> One column was added to the database.
#>        basisOfRecord .basisOfRecords_notStandard
#> 1    FOSSIL_SPECIMEN                       FALSE
#> 2            UNKNOWN                        TRUE
#> 3                RON                       FALSE
#> 4               <NA>                        TRUE
#> 5           Specimen                        TRUE
#> 6 PRESERVED_SPECIMEN                        TRUE