download_eml_attributes: Download attribute (column) metadata from a DataONE metadata...

View source: R/get_eml_attributes.R

download_eml_attributesR Documentation

Download attribute (column) metadata from a DataONE metadata object to csv files

Description

Download attribute metadata from an EML object as csvs. The name of each csv corresponds to the file name of the Data Object it describes. This can be prepended with the package identifier by setting prefix_file_names = TRUE (recommended).

Usage

download_eml_attributes(doc, download_directory, prefix_file_names = FALSE)

Arguments

doc

(emld) EML object.

download_directory

(character) Directory to download attribute metadata csvs to.

prefix_file_names

(logical) Optional. Whether to prefix file names with the package metadata identifier. This is useful when downloading files from multiple packages to one directory.

Author(s)

Dominic Mullen, dmullen17@gmail.com

Examples

## Not run: 
mn <- dataone::getMNode(cn, 'urn:node:ARCTIC')
doc <- EML::read_eml(rawToChar(dataone::getObject(mn, "doi:10.18739/A23W02")))
attributes <- datamgmt::download_eml_attributes(doc, download_directory = tempdir(),
prefix_file_names = TRUE)

## End(Not run)

NCEAS/datamgmt documentation built on June 5, 2023, 6:14 a.m.