get_package_deps: Create a list of R Package Dependencies

View source: R/get_package_deps.R

get_package_depsR Documentation

Create a list of R Package Dependencies

Description

Given a path to a directory this function will scan all .R and .Rmd files for any used R Packages along with their CRAN versions or GitHub references.

Usage

get_package_deps(app_dir = ".", all_deps = FALSE)

Arguments

app_dir

path to a directory containing R scripts or R Markdown files. Defaults to current working directory.

all_deps

boolean - whether or not to explicitly identify all "Imports" package dependencies of the packages used by your app.

Details

Currently, packages are detected via automagic::parse_packages() which supports the following calls within the code: library(), require(), and prefixed :: calls to functions.

Once an initial vector of package is created, each package is a checked that it can be downloaded and installed from CRAN or GitHub.

Value

a list of package dependencies with installation details

See Also

automagic::parse_packages()


polished documentation built on Feb. 16, 2023, 8:02 p.m.