list_deps: List dependencies of reports within a factory

Description Usage Arguments Value Note

View source: R/list_deps.R

Description

List package dependencies based on the reports and scripts within the report_sources and scripts directories respectively.

Usage

1
2
3
4
5
6
7
list_deps(
  factory = ".",
  missing = FALSE,
  check_r = TRUE,
  exclude_readme = TRUE,
  parse_first = FALSE
)

Arguments

factory

The path to the report factory or a folder within the desired factory. Defaults to the current directory.

missing

A logical indicating if only missing dependencies should be listed (TRUE); otherwise, all packages needed in the reports are listed; defaults to FALSE.

check_r

If true, R scripts contained within the factory will also be checked. Note that this will error if the script cannot be parsed.

exclude_readme

If TRUE (default) README files will not be checked for dependencies.

parse_first

If TRUE code will first be parsed for validity and unevaluated Rmd chunks will not be checked for dependencies. The default value is FALSE and, in this case, files will simply be checked line by line for calls to library, require or use of double, ::, and triple, ::: function calls.

Value

A character vector of package dependencies.

Note

This function requires that any R scripts present in the factory are valid syntax else the function will error.


reportfactory documentation built on Aug. 9, 2021, 5:07 p.m.