Display current Bioconductor and CRAN repositories.
repositories()
reports the URLs from which to
install Bioconductor and CRAN packages. It is used by
BiocManager::install()
and other functions.
repositories(site_repository = character(), version = BiocManager::version())
site_repository |
(Optional) |
version |
(Optional) |
repositories()
returns the appropriate software package
repositories for your version of Bioconductor.
Bioconductor has a 'release' and a 'devel' semi-annual release cycle. Packages within a release have been tested against each other and the current version of packages on CRAN. Bioconductor best practice is to use packages from the same release, and from the appropriate CRAN repository.
CRAN packages for out-of-date Bioconductor installations can be
installed from historical 'snapshots' consistent with the last date
the Bioconductor version was current. This behavior can be specified with
BiocManager.snapshot
For example, Bioconductor version 3.11 was current
until October 28, 2020; CRAN packages are therefore installed from
a snapshot created on 2020-10-28. By default, the snapshots are
from 'MRAN', the Microsoft R Archive Network. Use
options(BiocManager.snapshot = "RSPM")
to instead use the
RStudio Package Manager, or options(BiocManager.snapshot = "CRAN")
to use the current CRAN repository (i.e., disabling the
snapshot feature).
It may be desirable to specify different default repositories,
especially CRAN, for intentionally out-of-date Bioconductor
releases (e.g., to support reproducible research). Use the approach
provided by base R to specify alternative repositories, e.g.,
options(repos = c(CRAN = "https://mran.microsoft.com/snapshot/2020-02-08"))
. This is
supported, but generates an error because specification of an
inappropriate CRAN repository (one providing packages not
consistent with the dates of the Bioconductor release) results in
use of CRAN packages not consistent with Bioconductor best
practices.
If alternative default repositories are known to provide
appropriate versions of CRAN or Bioconductor packages, the warning
may be silenced (displayed as a message) with
options(BiocManager.check_repositories = FALSE)
. A message is
still printed, to serve as a reminder when debugging problems
related to incompatible package installation.
The intended use of site_repository =
is to enable installation of
packages not available in the default repositories, e.g., packages
internal to an organization and not yet publicly available. A
secondary use might provide alternative versions (e.g., compiled
binaries) of packages available in the default repositories. Note
that R's standard rules of package selection apply, so the most
recent version of candidate packages is selected independent of the
location of the repository in the vector returned by repositories()
.
For greater flexiblity in installing packages while still adhering
as much as possible to Bioconductor best practices, use
repositories()
as a basis for constructing the repos =
argument
to install.packages()
and related functions.
Named character()
of repositories.
BiocManager::\link{install}()
Installs or updates Bioconductor,
CRAN, and GitHub packages.
\link{chooseBioCmirror}()
choose an alternative Bioconductor
mirror; not usually necessary.
\link{chooseCRANmirror}()
choose an alternative CRAN mirror; not
usually necessary.
\link{setRepositories}()
Select additional repositories for
searching.
BiocManager::repositories() ## Not run: BiocManager::repositories(version="3.8") ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.