| cff_write {cffr} | R Documentation |
CITATION.cff fileThis is the core function of the package and likely to be the only one you would need when developing a package.
This function writes out a CITATION.cff file for a given package. This
function is basically a wrapper around cff_create() to both create the
cff object and writes it out to a YAML-formatted file in one command.
cff_write( x, outfile = "CITATION.cff", keys = list(), cff_version = "1.2.0", gh_keywords = TRUE, dependencies = TRUE, validate = TRUE, verbose = TRUE )
x |
The source that would be used for generating
the
|
outfile |
The name and path of the |
keys |
List of additional keys to add to the |
cff_version |
The Citation File Format schema version that the
|
gh_keywords |
Logical |
dependencies |
Logical |
validate |
Logical |
verbose |
Logical |
When creating and writing a CITATION.cff for the first time, the function
adds "CITATION.cff" to ".Rbuildignore".
A CITATION.cff file and an (invisible) cff object.
Guide to Citation File Format schema version 1.2.0.
Other core functions:
cff_create(),
cff_validate(),
cff()
tmpfile <- tempfile(fileext = ".cff")
cff_obj <- cff_write("jsonlite", outfile = tmpfile)
cff_obj
# Force clean-up
file.remove(tmpfile)