# Get the example data
data("beesRaw", package = "BeeBDC")
# Which datasets are static and should be excluded from matching?
excludeDataset <- c("BMin", "BMont", "CAES", "EaCO", "Ecd", "EcoS",
"Gai", "KP", "EPEL", "USGS", "FSCA", "SMC", "Bal", "Lic", "Arm", "BBD",
"MEPB")
# Match the data to itself just as an example of running the code.
beesRaw_out <- idMatchR(
currentData = beesRaw,
priorData = beesRaw,
# First matches will be given preference over later ones
matchBy = dplyr::lst(c("gbifID"),
c("catalogNumber", "institutionCode", "dataSource"),
c("occurrenceID", "dataSource"),
c("recordId", "dataSource"),
c("id"),
c("catalogNumber", "institutionCode")),
# You can exclude datasets from prior by matching their prefixs - before first underscore:
excludeDataset = excludeDataset)
Run the code above in your browser using DataLab