While these are not intended to be called manually by users, they may be of some use for advanced users.

getPkgVersions(pkgDT, install = TRUE)

getAvailable(pkgDT, purge = FALSE, repos = getOption("repos"))

installFrom(pkgDT, purge = FALSE, repos = getOption("repos"))

doInstalls(
  pkgDT,
  install_githubArgs,
  install.packagesArgs,
  install = TRUE,
  repos = getOption("repos"),
  ...
)

doLoading(pkgDT, require = TRUE, ...)

archiveVersionsAvailable(package, repos)

Arguments

pkgDT

A character string with full package names or a data.table with at least 2 columns "Package" and "packageFullName".

install

Logical or "force". If FALSE, this will not try to install anything. If "force", then it will force installation of requested packages, mimicking a call to e.g., install.packages. If TRUE, the default, then this function will try to install any missing packages or dependencies.

purge

Logical. Should all caches be purged Default is getOption("Require.purge", FALSE). There is a lot of internal caching of results throughout the Require package. These help with speed and reduce calls to internet sources. However, sometimes these caches must be purged. The cached values are renewed when found to be too old, with the age limit. This maximum age can be set in seconds with the environment variable R_AVAILABLE_PACKAGES_CACHE_CONTROL_MAX_AGE, or if unset, defaults to 3600 (one hour -- see available.packages).

Internally, there are calls to available.packages

repos

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

install_githubArgs

List of optional named arguments, passed to install_github.

install.packagesArgs

List of optional named arguments, passed to install.packages.

...

Passed to all of install_github, install.packages, and remotes::install_version, i.e., the function will error if all of these functions can not use the ... argument. Good candidates are e.g., type or dependencies. This can be used with install_githubArgs or install.packageArgs which give individual options for those 2 internal function calls.

require

Logical. If TRUE, the default, then the function will attempt to call require on all requested packages, possibly after they are installed.

package

A single package name (without version or github specifications)

Value

In general, these functions return a data.table with various package information, installation status, version, available version etc.

Details

doInstall is a wrapper around install.packages, remotes::install_github, and remotes::install_version.

doLoading is a wrapper around require.

archiveVersionsAvailable searches CRAN Archives for available versions. It has been borrowed from a sub-set of the code in a non-exported function: remotes:::download_version_url