Skip to contents

citeDataPackages() gives the references to cite for the MR1 data packages used in a study, following the citation rule of the BirdScan MR1 community:

  1. up to 3 data packages: cite each data package;

  2. more than 3 data packages: cite their owner collections (e.g. the collection of the Swiss Ornithological Institute);

  3. more than 3 owner collections: cite the community collection of the BirdScan MR1 community.

The collections are found through the IsPartOf links of the Zenodo records (see uploadCollectionToZenodo()). Packages that are not in an owner collection (or owner collections not in a community collection) are cited themselves, with a warning. Data packages are cited in the version that was used; collections in their latest version.

The references are built from the Zenodo metadata: creators, year of publication, title, version, publisher (Zenodo) and DOI.

Usage

citeDataPackages(x, sandbox = FALSE, token = NULL)

Arguments

x

The data packages used: a data package or a list of data packages (read with readDataPackageFromZenodo(), or any MR1 data package with its Zenodo DOI as id), a merged data package (mergeDataPackages()), or a character vector with the DOIs of the data packages (or collections, of which all members are counted).

sandbox

logical. Are the records on the Zenodo sandbox (https://sandbox.zenodo.org)? Only used for DOIs and packages without Zenodo information (mr1dp:zenodo). Default is FALSE.

token

Zenodo personal access token. Not needed for public records. Default is the environment variable ZENODO_TOKEN (or ZENODO_SANDBOX_TOKEN), if set.

Value

A data frame of class mr1dpCitation, with one row per reference and the columns level ("package", "owner collection" or "community collection"), doi, title, text (plain-text reference) and bibtex (BibTeX entry). Printing it shows the references as text; use utils::toBibtex() to get the BibTeX entries.

Author

Birgen Haest

Examples

if (FALSE) { # \dontrun{
# Read data packages from Zenodo and cite them
# ===========================================================================
dataPackages = readDataPackageFromZenodo(
  doi   = c("10.5281/zenodo.1234567", "10.5281/zenodo.2345678"),
  merge = FALSE
)
references = citeDataPackages(dataPackages)
references

# BibTeX entries for a reference manager
# ===========================================================================
writeLines(toBibtex(references), "references.bib")
} # }