Sometimes it is necessary to change the creators (authors) of a data package. If the data package and EML have already been created, it can be tedious to have to re-run all of the EMLassemblyline functions and then have to re-do all of the EMLeditor functions. This function allows the user to add in one or more creators without having to re-run the entire workflow. This will not over-write the or remove the existing creators, just add to the list of creators.
set_new_creator(
eml_object,
last_name = NA,
first_name = NA,
middle_name = NA,
organization_name = NA,
email_address = NA,
force = FALSE,
NPS = TRUE
)
is an EML-formatted R object, either generated in R or imported (typically from an EML-formatted .xml file) using EML::read_eml(
String (or list of strings). The last name(s) of the creator(s) to add. You must supply a last name for each creator.
String (or list of strings). The first name(s) or initials of the creator(s) to add. Use NA if there is no first name.
String (or list of strings). The middle name(s) or initial(s) of the creator(s) to add. Use NA if there is no middle name.
String (or list of strings). The organizational affiliation of the creator(s) to add, e.g. "National Park Service". Use NA if there is no organizational affiliation.
String (or list of strings). The email address(es) of the creator(s) to add. Use NA if there are no email addresses.
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.
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.
eml_object
Each creator must have at minimum a last name. You may also supply a first name and one middle name. If you are adding a list of creators, you must supply all fields for each creator; if one creator is for instance missing or does not use a first name, do not skip this but instead list it as NA. If you need to re-arrange creators or remove creators, you can do so using the set_creator_order
function.Do NOT use this function to add organizations as creators. Instead use set_creator_orgs
. If your new creator has an orcid, add the orcid in via set_creator_orgs
if (FALSE) { # \dontrun{
meta2 <- set_new_creator(metadata, "Doe", "John", "D.", "NPS", "John_Doe@nps.gov")
meta2 <- set_new_creator(metadata,
last_name = c("Doe", "Smith"),
first_name = c("John", "Jane"),
middle_name = c(NA, "S."),
organization_name = c("NPS", "UCLA"),
email_address = c("john_doe@nps.gov", NA))
} # }