scan_packages: Scan a project or folder for packages used

View source: R/scan_packages.R

scan_packagesR Documentation

Scan a project or folder for packages used

Description

Scan a project or folder for packages used

Usage

scan_packages(
  pkgs = "All",
  omit = c("grateful"),
  cite.tidyverse = TRUE,
  dependencies = FALSE,
  ...
)

Arguments

pkgs

Character. Either "All" to include all packages used in scripts within the project/folder (the default), or "Session" to include only packages used in the current session. Alternatively, pkgs can also be a character vector of package names to get citations for. To cite R as well as the given packages, include "base" in pkgs (see examples).

omit

Character vector of package names to be omitted from the citation report. grateful is omitted by default. Use omit = NULL to include all packages.

cite.tidyverse

Logical. If TRUE, all tidyverse packages (dplyr, ggplot2, etc) will be collapsed into a single citation of the 'tidyverse', as recommended by the tidyverse team.

dependencies

Logical. Include the dependencies of your used packages? If TRUE, will include all the packages that your used packages depend on.

...

Other parameters passed to renv::dependencies().

Value

a data.frame with package names and versions

Examples


scan_packages()
scan_packages(pkgs = "Session")
scan_packages(pkgs = c("renv", "remotes", "knitr"))


Pakillo/grateful documentation built on Oct. 28, 2023, 3:13 a.m.