Initialize a new GBIF Occurrence object
Usage
initializeGBIFOccurrence(
objectData,
idColumnInfo,
nameAutoMap = FALSE,
defDateFormat = "YYYY-MM-DD",
...
)Arguments
- objectData
A
data.framecontaining the data to import into the object- idColumnInfo
Either a
characterscalar containing the column name ofobjectDataor anintegerscalar giving the index of the column ofobjectDatathat corresponds to the ID variable. Alternatively, this parameter may be the qualified name of the Darwin core term for which the appropriately mapped column will be used as the ID variable (the possible Darwin core term names can be found by runningnames(getGBIFOccurrenceMembers()))- nameAutoMap
A
logicalscalar that ifTRUEmaps the columns ofobjectDatato their respective Darwin core terms based on the column names- defDateFormat
A
characterscalar providing the default format for strings denoting dates in the data table. See the https://dwc.tdwg.org/text/#1-introductionDarwin Core text guide for expected values for this string.- ...
A named set of paramaeters corresponding to Darwin core terms associated with the GBIFOccurrence class type. Each is either a
characterscalar containing the column name ofobjectDataor anintegerscalar giving the index of the column ofobjectDatathat corresponds to the term. Mappable terms can be found using:sapply(X = getGBIFOccurrenceMembers(), FUN = function(curTerm) { curTerm$getTermName() })
Examples
if (FALSE) {
## Get a dataset as an Archive and then extract the occurrence file
#'## Get the dataset using the key:
datasetKey <- "346a9b13-5c96-4793-bcd7-d6614950e726"
Archive <-getLNportalData(datasetKey = datasetKey)
core<-Archive$getCoreTable()
core=core$exportAsDataFrame()
GBIFOcc=initializeGBIFOccurrence(core, "id", TRUE)
}
