set_drr adds the DOI of an associated DRR

set_drr(
  eml_object,
  drr_ref_id,
  drr_title,
  org_name = "NPS",
  force = FALSE,
  NPS = TRUE
)

Arguments

eml_object

is an EML-formatted R object, either generated in R or imported (typically from an EML-formatted .xml file) using EML::read_eml(, from="xml").

drr_ref_id

a 7-digit string that is the DataStore Reference ID for the DRR associated with the data package.

drr_title

the title of the DRR as it appears in the DataStore Reference.

org_name

String. Defaults to NPS. If the organization publishing the DRR is not NPS, set org_name to your publishing organization's name.

force

logical. Defaults to false. If set to FALSE, a more interactive version of the function requesting user input and feedback. Setting force = TRUE facilitates scripting.

NPS

Logical. Defaults to TRUE. Most NPS users should leave this as the default. Only under specific circumstances should it be set to FALSE: if you are not publishing with NPS, if you need to set the publisher location to some place other than the Fort Collins Office (e.g. you are NOT working on a data package) or your product is "for" the NPS but not "by" the NPS and you need to specify a different agency, set NPS = FALSE. When NPS=TRUE, the function will over-write existing publisher info and inject NPS as the publisher along the the Central Office in Fort Collins as the location. Additionally, it sets the "for or by NPS" field to TRUE and specifies the originating agency as NPS.

Value

an EML-formatted R object

Details

adds uses the DataStore Reference ID for an associate DRR to the as a properly formatted DOI (prefaced with "DRR: ") to the element. Creates and populates required children elements for usageCitation including the DRR title, creator organization name, and report number. Note the organization name (org_name) defaults to NPS. If you do NOT want the organization name for the DRR to be NPS, set org_name="Your Favorite Organization" and set NPS=FALSE. Also sets the id flag for this usageCitation to "associatedDRR".

Examples

if (FALSE) { # \dontrun{
drr_title <- "Data Release Report for Data Package 1234"
set_drr(eml_object, "2293234", drr_title)
} # }