Learn R Programming

grateful (version 0.0.2)

cite_packages: Cite R packages used in a project

Description

This is a wrapper function.

Usage

cite_packages(
  all.pkg = TRUE,
  include.rmd = 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 scanForPackages, otherwise uses sessionInfo.

include.rmd

Logical. Include packages used in Rmarkdown documents? (default is TRUE, requires knitr package).

style

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

out.format

Output format, either "docx" (Word), "pdf", "html", or "md" (markdown).

out.dir

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

...

Other parameters passed to scanForPackages.

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