Scans a project (or folder) for references to packages.
scanForPackages(project = getwd(), verbose = TRUE, use.knitr = FALSE,
auto.install.knitr = FALSE, scan.rnw.with.knitr = FALSE)
A project path. This is the path to the root of the project that references the packages to be installed from the MRAN snapshot for the date specified for snapshotDate
. Defaults to current working directory using getwd()
.
If TRUE
, displays progress messages.
If TRUE
, parses all Rmarkdown
files using the knitr
package.
If TRUE
and the project contains rmarkdown files, then automatically included the packages knitr
in packages to install.
If TRUE
, uses knitr::knit()
to parse .Rnw
files, otherwise use utils::Sweave()
A list with two elements:
pkgs: a character vector with the names of identified packages
error: a character vector with information about files that could not be parsed