Learn R Programming

grateful (version 0.0.3)

cite_packages: Cite R packages used in a project

Description

This is a wrapper function.

Usage

cite_packages(
  all.pkg = TRUE,
  style = NULL,
  out.format = "html",
  out.dir = getwd(),
  ...
)

Arguments

all.pkg

Logical. Include all packages used in scripts within the project/folder (the default), or only packages used in the current session? If TRUE, uses dependencies, otherwise uses sessionInfo.

style

Optional. Citation style to format references. See https://www.zotero.org/styles.

out.format

Output format, either "docx", "pdf", "html", or "Rmd" (Rmarkdown).

out.dir

Directory to save the output document and a BibTeX file with the references. Defaults to working directory.

...

Other parameters passed to dependencies.

Value

A document with rendered citations in the desired format, plus a file ("pkg-refs.bib") containing references in BibTeX format.

Examples

Run this code
# NOT RUN {
library(grateful)
cite_packages()
cite_packages(style = "ecology", out.format = "docx")
# }

Run the code above in your browser using DataLab