Skip to content

Upcoming changes for R 4.6 and RStudio 2026

The ITSR support team will be making some changes to R and RStudio on Apocrita in August 2026. Some action will be required by users, so please read the below carefully.

1. Switch to using an Ubuntu 24.04 based container

Going forward, the default R module (soon to be 4.6.1) and RStudio 2026 will run from the same Ubuntu 24.04 based Apptainer container. This means we no longer need to use a Spack Environment to provide the system-level shared libraries many R packages require; they will come from this container instead. The ITSR team tested using Rocky 9 for this container, as we have done previously, to match the bare metal operating system Apocrita runs on. However, the way Rocky and RHEL 9 package key libraries such as GDAL lacks significant raster drivers compared to the Ubuntu version.

This change speeds up loading the R module and launching RStudio 2026 in Open OnDemand considerably, and also allows us to use the...

2. Posit Package Manager (PPM)

The Posit Package Manager (PPM) provides pre-compiled binaries for a large proportion of R packages from CRAN and Bioconductor. By using an Ubuntu 24.04 container for R 4.6.1 and RStudio 2026, we can make use of these pre-compiled binaries, which hugely speeds up package installation, as the packages are pre-compiled the PPM side and installing them is simply a case of pulling those pre-compiled binaries into your defined personal R library.

You don't need to do anything to setup PPM - both the R 4.6.1 module and RStudio 2026 will automatically set PPM as the source for all CRAN and Bioconductor package installs.

3. renv and pak

Previously, we recommended against using package helpers such as renv and pak when using R and RStudio on Apocrita. However, the new setup for R 4.6.1 and RStudio 2026 detailed above means that the environment that both run in is much more consistent. This opens up the possibility to use renv and pak with more confidence on Apocrita.

In fact, the popular devtools R package deprecated all install helpers for sources such as Github from v2.5.0 and replaced them with pak:

Package installation functions are now deprecated:

install_bioc(),install_bitbucket(),install_cran(),install_deps(), install_dev(),install_dev_deps(),install_git(),install_github(), install_gitlab(),install_local(),install_svn(),install_url(), install_version(),update_packages(),dev_package_deps(),github_pull(), and github_release(). We now recommend pak (https://pak.r-lib.org/) for general package installation. See ?install-deprecated for migration guidance.

Attempts to use these deprecated commands with devtools v2.5.0 or newer will throw errors:

Warning messages:
1: `install_github()` was deprecated in devtools 2.5.0.
i Please use pak::pak("user/repo") instead.

Frequently Asked Questions

Do I need to reinstall my personal R library?

Yes, but this is always the case for major point releases of R. R versions are numbered X.Y.Z - e.g. 4.6.1. The personal R library for each version is by default stored in:

${HOME}/R/x86_64-pc-linux-gnu-library/X.Y

So for R 4.6.1 this would be:

${HOME}/R/x86_64-pc-linux-gnu-library/4.6

Since this is the first time we have offered R 4.6 on Apocrita, the library shouldn't exist already. If it does and you have used some other method to create it and are now using our provided module and RStudio, it's best to clear it out and start fresh:

rm -rf ${HOME}/R/x86_64-pc-linux-gnu-library/4.6

How do I use Python with R?

You can either use Python from inside your R shell and scripts using reticulate, or you can use R inside your Python shell and scripts using Conda.

How do I use R with other modules on Apocrita?

Because the majority of the modules we offer centrally on Apocrita were compiled for Rocky 9, you may find combining them with the Ubuntu 24.04 environment of the R 4.6.1 module and RStudio 2026 has issues. We recommend running complex pipelines requiring multiple applications and languages in a Conda environment or a Spack environment. If you are still having difficulty, please raise a ticket and we will try to assist you.

If you have any questions regarding these changes, please contact us on our Slack channel (QMUL users only), or by sending an email to its-research-support@qmul.ac.uk which is handled directly by staff with relevant expertise.


Title image: Cris DiNoto on unsplash