Skip to contents

projr_yml_cite_set sets the citation options in _projr.yml.

The options are:

  • codemeta: whether to generate a codemeta.json file.

  • cff: whether to generate a CITATION.cff file. Indexable by GitHub and Zenodo.

  • inst-citation: whether to generate a CITATION file in the inst/ directory. If the project is installed as an R package, then citation data can be generated by citation(package = <project_name>).

The default is to leave all the settings unchanged.

If these settings are not setting in _projr.yml, then the default is to generate a codemeta.json file, a CITATION.cff file and a CITATION file in the inst/ directory.

projr_yml_cite_set_default sets all citation options to default (TRUE).

Usage

projr_yml_cite_set(
  all = NULL,
  codemeta = NULL,
  cff = NULL,
  inst_citation = NULL,
  simplify_identical = TRUE,
  simplify_default = TRUE,
  profile = "default"
)

projr_yml_cite_set_default(
  profile = "default",
  simplify_identical = TRUE,
  simplify_default = TRUE
)

Arguments

all

logical. Whether to set all the options to TRUE or FALSE. If NULL, then codemeta, cff and inst_citation are used. Default is NULL.

codemeta

logical. Whether to generate a codemeta.json file. If NULL, then setting is not changed.

cff

logical. Whether to generate a CITATION.cff file. If NULL, then setting is not changed.

inst_citation

logical. Whether to generate a CITATION file in the inst/ directory. If NULL, then setting is not changed.

simplify_identical

logical. If TRUE, then if all the settings are the same then only cite: TRUE or cite: FALSE is written to _projr.yml. Default is TRUE.

simplify_default

logical. If TRUE, then if all the settings are the same and equl to the default (TRUE), then the settings are not recorded in the projr configuration file (as the default will be equal to it).

profile

character. The profile to write to. Default is "default", in which case it writes to _projr.yml.

Examples

if (FALSE) { # \dontrun{
# set all to TRUE
projr_yml_cite_set(all = TRUE)

# set all to FALSE
projr_yml_cite_set(all = FALSE)

# set only cff to FALSE
projr_yml_cite_set(cff = FALSE)

# revert to defaults
projr_yml_cite_set_default()
} # }