generateBiocPkgDOI: Generate a DOI for a Bioconductor package

View source: R/newBiocPkgDOI.R

generateBiocPkgDOIR Documentation

Generate a DOI for a Bioconductor package

Description

This function makes calls out to the DataCite REST API described here: https://support.datacite.org/docs/api-create-dois. The function creates a new DOI for a Bioconductor package (cannot already exist). The target URL for the DOI is the short Bioconductor package URL.

Usage

generateBiocPkgDOI(pkg, authors, pubyear, event = "publish", testing = TRUE)

Arguments

pkg

character(1) package name

authors

character vector of authors (will be "pasted" together)

pubyear

integer(1) publication year

event

Either "hide", "register", or publish". Typically, we use "publish" to make the DOI findable.

testing

logical(1) If true, will use the apitest user with the password apitest. These DOIs will expire. The same apitest:apitest combination can be used to login to the website for doing things using the web interface. If false, the Bioconductor-specific user credentials should be in the correct environment variables

Details

The login information for the "real" Bioconductor account should be stored in the environment variables "DATACITE_USERNAME" and "DATACITE_PASSWORD

The GUI is available here: https://doi.datacite.org/.

Value

The DOI as a character(1) vector.

Examples

## Not run: 
  x = generateBiocPkgDOI('RANDOM_TEST_PACKAGE','Sean Davis',1972)

## End(Not run)

seandavi/BiocPkgTools documentation built on Feb. 2, 2024, 12:02 p.m.