The modules a manual documents declare their own reqdPkgs, which the manual
must install before it can knit their chapters. Call this after the manual's
own dependencies are in place – typically right after
remotes::install_deps(), which is what installs this package.
Usage
installModulePkgs(
modulePath = "modules",
modules = NULL,
dependencies = TRUE,
install = TRUE
)Arguments
- modulePath
directory holding the module directories.
- modules
names of the modules to resolve. Defaults to every directory under
modulePath.- dependencies
whether to expand each module package's own dependencies with
Require::pkgDep2()before installing.FALSEinstalls only the packages the modules name.- install
whether to install.
FALSEresolves the package list and returns it without installing anything, which is useful for seeing what a manual's modules ask for.
Details
The package list is deliberately assigned before being installed rather than
piped. Require::Install() names its first parameter packages and calls
substitute() on it, so a piped expression resolves to the literal string
"packages" and the installer is asked for a package by that name.
Require::pkgDep2() also returns a named list, which Install() wants
flattened.