Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

install

Install or update Bioconductor, CRAN, and GitHub packages


Description

The BiocManager::install() function installs or updates Bioconductor and CRAN packages in a Bioconductor release. Upgrading to a new Bioconductor release may require additional steps; see https://bioconductor.org/install.

Usage

install(
  pkgs = character(),
  ...,
  site_repository = character(),
  update = TRUE,
  ask = TRUE,
  checkBuilt = FALSE,
  force = FALSE,
  version = BiocManager::version()
)

Arguments

pkgs

character() vector of package names to install or update. A missing value updates installed packages according to update = and ask =. Package names containing a '/' are treated as GitHub repositories and installed using remotes::install_github().

...

Additional arguments used by install.packages().

site_repository

(Optional) character(1) vector representing an additional repository in which to look for packages to install. This repository will be prepended to the default repositories (which you can see with BiocManager::\link{repositories}()).

update

logical(1). When FALSE, BiocManager::install() does not attempt to update old packages. When TRUE, update old packages according to ask.

ask

logical(1) indicating whether to prompt user before installed packages are updated. If TRUE, user can choose whether to update all outdated packages without further prompting, to pick packages to update, or to cancel updating (in a non-interactive session, no packages will be updated unless ask = FALSE).

checkBuilt

logical(1). If TRUE a package built under an earlier major.minor version of R (e.g., 3.4) is considered to be old.

force

logical(1). If TRUE re-download a package that is currently up-to-date.

version

character(1) Bioconductor version to install, e.g., version = "3.8". The special symbol version = "devel" installs the current 'development' version.

Details

Installation of Bioconductor and CRAN packages use R's standard functions for library management – install.packages(), available.packages(), update.packages(). Installation of GitHub packages uses the remotes::install_github().

When installing CRAN or Bioconductor packages, typical arguments include: lib.loc, passed to \link{old.packages}() and used to determine the library location of installed packages to be updated; and lib, passed to \link{install.packages}() to determine the library location where pkgs are to be installed.

When installing GitHub packages, ... is passed to the remotes package functions \link[remotes]{install_github}() and remotes:::install(). A typical use is to build vignettes, via dependencies=TRUE, build_vignettes=TRUE.

See ?repositories for additional detail on customizing where BiocManager searches for package installation.

BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS is an environment variable or global options() which, when set to FALSE, avoids the R and Bioconductor version checks that are done by querying an online configuration file. Setting BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS to FALSE can speed package loading when internet access is slow or non-existent, but may result in out-of-date information about the current release and development versions of Bioconductor. Offline users should set the BIOCONDUCTOR_CONFIG_FILE environment variable or option to a .yaml file similar to https://bioconductor.org/config.yaml for full offline use and version validation.

Value

BiocManager::install() returns the pkgs argument, invisibly.

See Also

BiocManager::\link{repositories}() returns the Bioconductor and CRAN repositories used by install().

\link{install.packages}() installs the packages themselves (used by BiocManager::install internally).

\link{update.packages}() updates all installed packages (used by BiocManager::install internally).

\link{chooseBioCmirror}() allows choice of a mirror from all public Bioconductor mirrors.

\link{chooseCRANmirror}() allows choice of a mirror from all public CRAN mirrors.

Examples

## Not run: 
## update previously installed packages
BiocManager::install()

## install Bioconductor packages, and prompt to update all
## installed packages
BiocManager::install(c("GenomicRanges", "edgeR"))

## install a CRAN and Bioconductor packages:
BiocManager::install(c("survival", "SummarizedExperiment"))

## install a package from source:
BiocManager::install("IRanges", type="source")

## End(Not run)

BiocManager

Access the Bioconductor Project Package Repository

v1.30.15
Artistic-2.0
Authors
Martin Morgan [aut] (<https://orcid.org/0000-0002-5874-8148>), Marcel Ramos [ctb, cre] (<https://orcid.org/0000-0002-3242-0582>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.