nationalparkservice / EMLeditor

EMLeditor edits EML metadata to add required fields for DataStore and automates creating drafts and uploading data packages to DataStore
https://nationalparkservice.github.io/EMLeditor/
Other
5 stars 6 forks source link

set_creator_orcids sometimes inadvertently provides errors/warnings #169

Closed RobLBaker closed 1 week ago

RobLBaker commented 1 week ago
> EML::eml_validate(meta)
[1] TRUE
attr(,"errors")
character(0)
> creator_orcids <- c("0000-0002-6635-1490",NA,NA,"0009-0004-8436-4975",NA)
> metadata_file_out <- EMLeditor::set_creator_orcids(metadata_file_out, creator_orcids)
Error in `tibble::tibble()`:
! Tibble columns must have compatible sizes.
• Size 5: Existing data.
• Size 2: Column at position 2.
ℹ Only values of size one are recycled.
Run `rlang::last_trace()` to see where the error occurred.
> creator_orcids <- c("0000-0002-6635-1490","NA","NA","0009-0004-8436-4975","NA")
> metadata_file_out <- EMLeditor::set_creator_orcids(metadata_file_out, creator_orcids)
It appears some authors do not have orcids.
Please specify these as NA (without quotes).