install.pkgs: Enhanced Package Installation

Description Usage Arguments Details Repositories

Description

These functions are enhanced versions of the base functions install.packages, available.packages and link{download.packages} (see Details).

Usage

1
2
3
4
install.pkgs(pkgs, lib = NULL, repos = getOption("repos"),
  type = getOption("pkgType"), dependencies = NA, available = NULL, ...,
  reload = FALSE, upgrade_dependencies = FALSE, quick = FALSE,
  dry.run = NULL, devel = FALSE, verbose = TRUE)

Arguments

pkgs

character vector of the names of packages whose current versions should be downloaded from the repositories or of path to source/binary package files (or a mixed of both).

lib

character vector giving the library directories where to install the packages. Recycled as needed. If missing, defaults to the first element of .libPaths().

repos

URL or specification of CRAN-like package repository (see section Repositories). Use repos = '+http://myrepo.org' to append repositories to the default ones.

type

character, indicating the type of package to download and install. Will be "source" except on Windows and some macOS builds: see the section on ‘Binary packages’ for those.

dependencies

logical indicating whether to also install uninstalled packages which these packages depend on/link to/import/suggest (and so on recursively). Not used if repos = NULL. Can also be a character vector, a subset of c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances").

Only supported if lib is of length one (or missing), so it is unambiguous where to install the dependent packages. If this is not the case it is ignored, with a warning.

The default, NA, means c("Depends", "Imports", "LinkingTo").

TRUE means to use c("Depends", "Imports", "LinkingTo", "Suggests") for pkgs and c("Depends", "Imports", "LinkingTo") for added dependencies: this installs all the packages needed to run pkgs, their examples, tests and vignettes (if the package author specified them correctly).

In all of these, "LinkingTo" is omitted for binary packages.

available

a matrix as returned by available.packages listing packages available at the repositories, or NULL when the function makes an internal call to available.packages. Incompatible with type = "both".

...

extra parameters eventually passed to the corresponding base function.

reload

if TRUE (the default), will automatically reload the package after installing.

upgrade_dependencies

If TRUE, the default, will also update any out of date dependencies.

quick

if TRUE skips docs, multiple-architectures, demos, and vignettes, to make installation as fast as possible.

dry.run

logical that indicates if one should only return the computed set of packages and dependencies to install. If NULL, then it is internally set to TRUE only when there is a mismatch between the requested and the OS binary package types (e.g., if type = 'win.both' on a Unix/Mac host).

devel

indicates if development packages hosted on GRAN (GitHub) should be preferred to versions available in regular repositories. The following values are allowed:

  • FALSE: package versions on regular repositories have priority over all other versions.

  • TRUE: 'release' GRAN versions (i.e. from master branches) are preferred to versions on regular repositories (if their version is number is larger) and 'devel' development versions (i.e. on branches that start with 'devel').

  • 2: 'devel' GRAN versions are preferred over all other versions.

In any case, packages not found in regular repositories are looked up on GRAN release, then GRAN devel if still not found.

verbose

verbosity level (logical or numeric)

Details

The main differences with the base functions are that:

install.pkgs installs packages, which can be local, remote or in a CRAN-like repository, possibly password protected. Packages and their dependencies are automatically search in Bioconductor, Omegahat and GRAN repositories if needed.

Repositories

Respositories can be specified as a character vector that is processed in the following way:


renozao/repotools documentation built on May 27, 2019, 5:53 a.m.