eml_nsf_to_project: Create an EML project section from a list of NSF award...

View source: R/eml.R

eml_nsf_to_projectR Documentation

Create an EML project section from a list of NSF award numbers

Description

This function takes a list of NSF award numbers and uses it to query the NSF API to get the award title, PIs, and coPIs. The return value is an EML project section. The function supports 1 or more award numbers

Usage

eml_nsf_to_project(awards, eml_version = "2.2")

Arguments

awards

(list) A list of NSF award numbers as characters

eml_version

(char) EML version to use (2.1.1 or 2.2.0)

Value

project (emld) An EML project section

Examples

awards <- c("1203146", "1203473", "1603116")

proj <- eml_nsf_to_project(awards, eml_version = "2.1.1")

me <- list(individualName = list(givenName = "Jeanette", surName = "Clark"))

doc <- list(packageId = "id", system = "system",
           dataset = list(title = "A Mimimal Valid EML Dataset",
                          creator = me,
                          contact = me))

doc$dataset$project <- proj

EML::eml_validate(doc)


NCEAS/arcticdatautils documentation built on Aug. 28, 2023, 12:10 p.m.