install_packages | R Documentation |
Install packages from a set of traditional repositories, or a Just-in-time repository constructed using a PkgManifest or SessionManifest
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, ...)
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 |
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.
a vector of names of the packages installed.
Gabriel Becker
Becker G, Barr C, Gentleman R, Lawrence M; Enhancing Reproducibility and Collaboration via Management of R Package Cohorts. Journal of Statistical Software, 81(1). 2017. doi: 10.18637/jss.v082.i01
## 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 = makeSeedMan("myotherlib")
install_packages(man2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.