R/eml.R
reorder_pids.Rd
This function takes a named list of data objects, such as what is
returned from get_package
, and reorders them according to the order
they are given in the EML document.
reorder_pids(pid_list, doc)
pid_list | (list) A named list of data pids |
---|---|
doc | (list) an |
ordered_pids (list) A list of reordered pids
if (FALSE) { cn <- dataone::CNode('PROD') adc <- dataone::getMNode(cn,'urn:node:ARCTIC') ids <- get_package(adc, 'resource_map_doi:10.18739/A2S17SS1M', file_names = TRUE) doc <- EML::read_eml(dataone::getObject(adc, ids$metadata)) # return all entity types ordered_pids <- reorder_pids(ids$data, doc) }