Create a list of R Package Dependencies
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.
get_package_deps(app_dir = ".", verbose = TRUE)
app_dir |
path to a directory containing R scripts or RMarkdown files. Defaults to current working directory if left blank. |
verbose |
logical - defaults to TRUE. Will provide feedback to detected or invalid R packages. |
Currently, detections are made 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 detections is built, it is further processed by
validating that each detection is indeed a valid CRAN
or public GitHub
package
and can be installed.
a list of package dependencies
library(polished) dir <- system.file("examples", "polished_example_01", package = "polished") pkg_deps <- polished:::get_package_deps(dir)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.