Return attribute metadata from an EML object or DataONE package URL. This is largely a wrapper for the function EML::get_attributes().

get_eml_attributes_url(mn, url_path, write_to_csv = FALSE,
  prefix_file_names = FALSE, download_directory = NULL)

Arguments

mn

(MNode/CNode) The DataONE Node that stores the Metadata object, from https://cn.dataone.org/cn/v2/node

url_path

(character) The URL of the DataONE Package.

write_to_csv

(logical) Optional. Option whether to download the attribute metadata to csv files. Defaults to FALSE

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.

download_directory

(character) Optional. Directory to download attribute metadata csv files to. Required if write_to_csv is TRUE.

Value

(list) A list of all attribute metadata from the EML in data.frame objects.

Examples

# NOT RUN {
attributes <- get_eml_attributes(mn,
"https://arcticdata.io/catalog/#view/doi:10.18739/A23W02")

# Download attribute metadata in csv format:
attributes <- get_eml_attributes(mn,
"https://arcticdata.io/catalog/#view/doi:10.18739/A23W02",
write_to_csv = TRUE,
download_directory = tempdir())
# switch nodes
cn <- dataone::CNode('PROD')
knb <- dataone::getMNode(cn,"urn:node:KNB")
attributes <- get_eml_attributes(knb,
"https://knb.ecoinformatics.org/#view/doi:10.5063/F1639MWV")
# }