Learn R Programming

Require (version 0.0.6)

getPkgVersions: Internals used by Require

Description

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

Usage

getPkgVersions(pkgDT, install = TRUE)

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

installFrom(pkgDT)

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. 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