% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/repositories.R
\name{repositories}
\alias{repositories}
\alias{BiocManager.check_repositories}
\alias{containerRepository}
\alias{BINARY_BASE_URL}
\title{Display current Bioconductor and CRAN repositories.}
\usage{
repositories(
  site_repository = character(),
  version = BiocManager::version(),
  ...,
  type = "both"
)

containerRepository(version = BiocManager::version(), type = "binary")
}
\arguments{
\item{site_repository}{(Optional) \code{character(1)} representing an
additional repository (e.g., a URL to an organization's
internally maintained repository) in which to look for packages
to install. This repository will be prepended to the default
repositories returned by the function.}

\item{version}{(Optional) \code{character(1)} or \code{package_version}
indicating the \emph{Bioconductor} version (e.g., "3.8") for which
repositories are required.}

\item{...}{Additional parameters passed to lower level functions, not
used.}

\item{type}{(Optional) \code{character(1)} indicating the type of package
repository to retrieve (default: "both"). Setting \code{type} to "source" will
disable any Bioconductor binary packages specifically built for the
containers.}
}
\value{
\code{repositories()}: named \code{character()} of repositories.

\code{containerRepository()}: character(1) location of binary repository,
if available, or character(0) if not.
}
\description{
\code{repositories()} reports the URLs from which to
install \emph{Bioconductor} and CRAN packages. It is used by
\code{BiocManager::install()} and other functions.

\code{containerRepository()} reports the location of the repository
of binary packages for fast installation within containerized versions
of Bioconductor, if available.
}
\details{
\code{repositories()} returns the appropriate software package
repositories for your version of \emph{Bioconductor}.

\emph{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. \emph{Bioconductor}
best practice is to use packages from the same release, and from
the appropriate CRAN repository.

To install binary packages on containerized versions of Bioconductor,
a default binary package location URL is set as a package constant,
see \code{BiocManager:::BINARY_BASE_URL}. Binary package installations
are enabled by default for Bioconductor Docker containers. Anyone
wishing to opt out of the binary package installation can set either the
variable or the option, \env{BIOCONDUCTOR_USE_CONTAINER_REPOSITORY}, to
\code{FALSE}. Note that the availability of Bioconductor package binaries is
experimental and binary installations are intended to be used with
\code{bioconductor/bioconductor_docker} images where such installations
correspond to specific versions of Linux / Ubuntu.

If alternative default repositories are known to provide appropriate
versions of CRAN or \emph{Bioconductor} packages, the message may be silenced
by setting either the option or the variable to \code{FALSE}, i.e.,
\code{options(BiocManager.check_repositories = FALSE)} or
\env{BIOCMANAGER_CHECK_REPOSITORIES=FALSE}. Alternative default
repositories are not guaranteed to work without issues related to
incompatible package installations and are used at the user's own risk.

The intended use of \verb{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 \emph{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 \code{repositories()}.
To set a more permenanent \code{site_repository}, one can use either the
\env{BIOCMANAGER_SITE_REPOSITORY} environment variable or the
\code{options(BiocManager.site_repository = ...)} option.

For greater flexiblity in installing packages while still adhering
as much as possible to \emph{Bioconductor} best practices, use
\code{repositories()} as a basis for constructing the \verb{repos =} argument
to \code{install.packages()} and related functions.

The unexported URL to the base repository is available with
\code{BiocManager:::BINARY_BASE_URL}.

\env{BIOCONDUCTOR_USE_CONTAINER_REPOSITORY} is an environment
variable or global \code{options()} which, when set to \code{FALSE}, avoids
the fast installation of binary packages within containerized
versions of Bioconductor.
}
\examples{
BiocManager::repositories()
\dontrun{
BiocManager::repositories(version="3.8")
}

containerRepository() # character(0) if not within a Bioconductor container

}
\seealso{
\code{BiocManager::\link{install}()} Installs or updates Bioconductor,
CRAN, and GitHub packages.

\code{\link{chooseBioCmirror}()} choose an alternative Bioconductor
mirror; not usually necessary.

\code{\link{chooseCRANmirror}()} choose an alternative CRAN mirror; not
usually necessary.

\code{\link{setRepositories}()} Select additional repositories for
searching.
}
\keyword{environment}
