annotate_eml | R Documentation |
Annotate an EML file (.xml) or an emld list object
annotate_eml(annotations = NULL, eml.in = NULL, eml.out = NULL)
annotations |
(character; data frame) Path or data frame of the annotations.txt
template for annotating |
eml.in |
(EML; emld list) Path to, or emld list of, the EML file to be annotated.
Accepted versions of the emld list object can be created by
|
eml.out |
(character) Path of the annotated EML file to be written. |
(EML; emld list) If the input to eml.in
is an EML file then the
output will be an EML file. The emld list object is always returned.
All annotated elements are assigned ids and their annotations are placed both immediately under the parent element (subject) when supported and within the /eml/annotations node through id+reference pairs. This redundant approach supports variation in where EML metadata consumers harvest this information and supports annotation of EML elements requiring id+references.
# Annotate an EML file --------------------------------------------------------
#
# Annotate an existing EML file (edi.260.3.xml) and write a new version
# (edi.260.4.xml)
eml <- annotate_eml(
annotations = system.file("/examples/pkg_260/metadata_templates_overflow/annotations.txt", package = "EMLassemblyline"),
eml.in = system.file("/examples/eml/edi.260.3.xml", package = "EMLassemblyline"),
eml.out = paste0(tempdir(), "/edi.260.4.xml")
)
eml
# Remove the EML files from the temporary directory
unlink(paste0(tempdir(), "/edi.260.3.xml"))
unlink(paste0(tempdir(), "/edi.260.4.xml"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.