Create a citation *.cff file for the dataset from a given DOI (Digital Object Identifier). When a DOI is supplied, it adds the DOI badge to the README RMarkdown file and re-builds the README.md and pkgdown website if they exist. Before a release exists, call it without arguments to generate the citation files without a DOI or badge.
Usage
update_citation(doi = NULL, build = TRUE, type = c("dataset", "software"))Arguments
- doi
DOI (Digital Object Identifier), e.g., 10.5281/zenodo.11185699.
- build
Logical. Rebuild README.md and the pkgdown site after the citation files change? Defaults to
TRUE. Set toFALSEto regenerate the citation files alone, e.g., in scripts and tests. Defaults to NULL for the pre-release call, in which case no DOI is recorded and no badge is added.- type
The CFF
typeof the work:"dataset"(the default, a data package) or"software". Before 1.1.1 the file always said software, the cffr default. Zenodo's GitHub integration ignores this field; the resource type of a deposit comes from a.zenodo.json(#56).
See also
Before: setup_website(). Run again with the DOI after the Zenodo release; update_metadata() then picks the DOI up.
Other metadata functions:
update_description(),
update_metadata()