7  Binaries

7.1 How to install Linux binary packages?

R-universe builds and checks Linux binaries for one Linux distribution: ubuntu:latest (currently ubuntu 24.04 aka “noble”). This is the most widely used Linux distribution and also the platform used by the R-universe build system itself, as configured in the base-image.

On Linux, R-universe builds and checks Linux binaries for R-devel and R-release, for both on x86_64 and arm64 systems. The repositories use the following URL pattern:

https://${owner}.r-universe.dev/bin/linux/${distro}-${arch}/${rversion}/

There is no need to set a custom user agent. To install these binaries on Linux, add the corresponding repository to your repos. You can use the cran.r-universe.dev instead of a regular CRAN mirror in order to get binaries for all the CRAN dependencies as well. Below is an example function that you can put in e.g. your ~/.Rprofile file to set the option(repos) :

linux_binary_repo <- function(universe){
  sprintf('https://%s.r-universe.dev/bin/linux/noble-%s/%s/', 
    universe,
    R.version$arch, 
    substr(getRversion(), 1, 3))
}

# For example: enable ropensci and cran repositories 
options(repos = linux_binary_repo(c('ropensci', 'cran')))

After setting your options(repos) like this, install.packages() will automatically install binaries when available, and fall back to source installations for other packages.

Also see how this is done automatically in the base image Rprofile.

7.2 Binaries for packages with compiled code

In information on packages provided by the API, the arch field to the binaries field only if there is compiled code in the package. Packages without compiled code are identical on all architectures.

On MacOS and Linux we only build a separate x86_64 and arm64 version for packages with compiled code, otherwise the same binary is used for both.

7.3 How to use WebAssembly Binaries

We have experimental support for webassembly binaries! You should use the official r-wasm repository for dependencies. For example to install the dev version of dplyr:

install.packages('dplyr',
  repos = c('https://tidyverse.r-universe.dev', 'https://repo.r-wasm.org'))