NCEAS / datateam-training

Training and reference materials for ADC and SASAP data team members
https://nceas.github.io/datateam-training/training/
Apache License 2.0
7 stars 22 forks source link

Provide a section on reordering entities #280

Closed laijasmine closed 2 years ago

laijasmine commented 3 years ago

Rearrange file order alphabetically:

  1. metadata:
    doc$dataset$otherEntity <- doc$dataset$otherEntity[order(entity_names)]
  2. datafiles (using arcticdatautils):
    pkg <- get_package(adc, rm, file_names = T)
    doc <- EML::read_eml(getObject(adc, pkg$metadata))
    reordered <- arcticdatautils::reorder_pids(pkg$data, doc)