install: install_packages

Description Usage Arguments Details Author(s) Examples

Description

Install packages from a set of traditional repositories, or a Just-in-time repository constructed using a PkgManifest or SessionManifest

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
install_packages(pkgs, repos, versions = NULL, verbose = FALSE, ...)

## S4 method for signature 'character,character'
install_packages(pkgs, repos, versions = NULL,
  verbose = FALSE, ...)

## S4 method for signature 'character,missing'
install_packages(pkgs, repos, versions = NULL,
  verbose = FALSE, ...)

## S4 method for signature 'SessionManifest,ANY'
install_packages(pkgs, repos, versions = NULL,
  verbose = FALSE, ...)

## S4 method for signature 'character,SessionManifest'
install_packages(pkgs, repos,
  versions = NULL, verbose = FALSE, ...)

## S4 method for signature 'character,PkgManifest'
install_packages(pkgs, repos,
  versions = NULL, verbose = FALSE, ...)

Arguments

pkgs

The names of the packages to install

repos

The (generalized) repositor(ies) to install the packages from. Can be a character vector of traditional package repositories (as with install.packages) or a PkgManifest or SessionManifest (or a url thereof)

versions

An optional named character vector or data.frame specifying exact versions of the packages to install

verbose

Should extra information be printed during the console during installation

...

extra parameters passed directly to install.packages

Details

In addition to installing the specified packages, this function annotates the installed DESCRIPTION files with provenance information about where the packages were installed from. This retains the information necessary to generate a manifest of installed packages for publication or reinstallation.

When repos is a vector of traditional repositories, this function - with the exception of the provenance mentioned above - behaves identically to install.packages. Otherwise, a Just-in-Time package repository is constructed using the information in the manifest(s) passed to repos, which is then used in conjuction with link{install.packages} to do the actual installation.

Author(s)

Gabriel Becker

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
## equivalent to install.packages, except it stores
## package provenance and knows about bioconductor repos
install_packages("nlme")

## install from a manifest
man = GithubManifest("gmbecker/fastdigest")
install_packages("fastdigest", man)

## install a full seeding manifest
man2 = makeSeedManifest("myotherlib")
install_packages(man2)

## End(Not run)

switchr documentation built on May 19, 2017, 10:05 a.m.

Search within the switchr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.