R6 class representing a complete data structure for a Darwin Core archive
Details
The DwcArchive class serves a base class to all Darwin Core
archive file types. This class supports all kinds of Darwin Core archive files
but may miss some of the specialised functionality of the more specialist
classes. See https://dwc.tdwg.org/text/the Darwin core archive guide
for more information on the structure of Darwin core archive files.
Methods
Method new()
Create a new DwCAchive object
Usage
DwCArchive$new(coreDwC, extDwC = NULL, metadata = NULL)Arguments
coreDwCA
DwCGeneric(or derived class) object that represents the table that corresponds to the 'core' table. Alternatively, this parameter can becharacterscalar giving the location of the Darwin core archive file to initialize the object fromextDwCA
listofDwCGeneric(or derived class) objects that represent the tables used as extension objects in the Darwin Core archive. IfcoreDwCis a character scalar thenextDwCcan also be a character scalar that contains the default file encodings for the files in the Darwin core archivemetadataA
DwCMetadataobject that contains the metadata for the archive
Method exportAsDwCArchive()
Export the archive as a Darwin core archive file
Usage
DwCArchive$exportAsDwCArchive(
fileName,
quote = TRUE,
sep = "\t",
eol = "\n",
na = "",
dec = ".",
qmethod = "escape",
fileEncoding = "",
emlLocation = "eml.xml"
)Arguments
fileNameA
characterstring containing the file location of the output Darwin Core Archive.quoteA
logicalscalar or anumericvector. IfTRUE, any character or factor columns will be surrounded by double quotes. If anumericvector, its elements are taken as the indeces of columns to quote. In both cases, row and column names are quoted if they are written. IfFALSE, nothing is quoted.sepThe field seperator stirng. Values within each row are separated by this string.
eolThe character(s) to print at the end of each line (row).
naThe string to use for missing values in the data.
decThe string to use for decimal points in numeric or complex columns: must be a single character
qmethodA character string specifying how to deal with embedded double quote characters when quoting strings. Must be one of
"escape", in which case the quote character is escaped in C style by a backslash, or"double", in which case it is doubledfileEncodingA character string. If non-empty, declares the encoding to be used on a file so the character data can be re-encoded as they are written
emlLocationThe location to store the EML metadata in the Darwin Core archive
Method getExtensionTables()
Retrieve an extension table from the archive
