Skip to content

repositories

A list of CRAN-like repositories to fetch packages from. Packages will be installed from the first repository a resolvable version is found in, thus the order matters!! For more information, refer to the Resolution section. By default, packages are fetched as binaries when possible.

  • alias - Used for self-organization and to specify a certain repository source for a dependency
  • url - The URL to the CRAN-like repository from which to fetch packages
  • force_source optional - Force all packages coming from the repository to be source

    Default: false

repositories = [
{ alias = "PPM", url = "https://packagemanager.posit.co/cran/latest" },
{ alias = "BioCsoft", url = "https://bioconductor.org/packages/3.21/bioc", force_source = true },
]

Currently, rv is tuned to best support CRAN and PPM style repositories, but there are a few specific repositories to call out:

Bioconductor is just a collection of CRAN-like repositories. In R itself, tools like BiocManager expands the repositories and sets them, so that when you call install.packages() it will search through them to find the package of interest.

rv can do that expansion for you Introduced in rv v0.23.0, with a bioconductor entry in the repositories list instead of an alias/url pair:

repositories = [
{ alias = "PPM", url = "https://packagemanager.posit.co/cran/latest" },
{ bioconductor = "auto" },
]

That entry expands to the four Bioconductor repositories, in this order:

{ url = "https://bioconductor.org/packages/3.22/bioc" },
{ url = "https://bioconductor.org/packages/3.22/data/annotation" },
{ url = "https://bioconductor.org/packages/3.22/data/experiment" },
{ url = "https://bioconductor.org/packages/3.22/workflows" },
  • bioconductor - The Bioconductor version to use:
    • auto - the latest release matching the r_version of the project
    • release - the current Bioconductor release
    • devel - the current Bioconductor devel version
    • an explicit version, like 3.21. A version released after your rv was built is used as-is: only versions that never existed are refused
  • mirror optional - Fetch from a mirror instead of https://bioconductor.org. The /packages/<version>/<repository> paths are appended to it, so the mirror must follow the same layout. Can also be set for every project with the RV_BIOC_MIRROR environment variable

    Default: https://bioconductor.org

  • force_source optional - Force all packages coming from those repositories to be source

    Default: false

Only one bioconductor entry is allowed per config. List the repository URLs yourself if you need more to mix versions.

To require that a package comes from Bioconductor, use bioconductor = true on the dependency. The expanded repositories are internal, they appear as __rv__BioCsoft and friends in rv output and in options("repos"), and cannot be used as a dependency’s repository alias.

R-universe is formatted like a CRAN-like repository, but is missing a critical component: there is no archive. Since reproducibility is at the forefront of design considerations with rv, we currently consider packages sourced from R-universe as git dependencies from the beginning. While this may lead to a temporary slow down due to compilation, it is more reproducible. We may consider downloading compiled binaries for available packages in the future if the need arises.