Internal function to install packages

.installPackages(packages, repos = getOption("repos"),
  githubPkgs = character(0), githubPkgNames,
  nonLibPathPkgs = character(0), install_githubArgs,
  install.packagesArgs = list(), libPath = .libPaths()[1],
  standAlone = standAlone, forget = FALSE)

Arguments

packages

Character vector of packages to install via install.packages, then load (i.e., with library). If it is one package, it can be unquoted (as in require)

repos

The remote repository (e.g., a CRAN mirror), passed to install.packages,

githubPkgs

Character vector of github repositories and packages, in the form repository/package@branch, with branch being optional.

githubPkgNames

Character vector of the package names, i.e., just the R package name.

nonLibPathPkgs

Character vector of all installed packages that are in .libPaths, but not in libPath. This would normally include a listing of base packages, but may also include other library paths if standAlone if FALSE

install_githubArgs

List of optional named arguments, passed to install_github

install.packagesArgs

List of optional named arguments, passed to install.packages

libPath

The library path where all packages should be installed, and looked for to load (i.e., call library)

standAlone

Logical. If TRUE, all packages will be installed and loaded strictly from the libPaths only. If FALSE, all .libPaths will be used to find the correct versions. This can be create dramatically faster installs if the user has a substantial number of the packages already in their personal library. In the case of TRUE, there will be a hidden file place in the libPath directory that lists all the packages that were needed during the Require call. Default FALSE to minimize package installing.

forget

Internally, this function identifies package dependencies using a memoised function for speed on reuse. But, it may be inaccurate in some cases, if packages were installed manually by a user. Set this to TRUE to refresh that dependency calculation.

Examples

# NOT RUN {
  .installPackages("crayon")
# }