Draft

R 4.5.0 is Available

software
update
r
draft
Author

Henrik Bengtsson

Published

May 1, 2025

The R Logo

TL;DR

R 4.5.0 was released on 2025-04-11 and is now available on Wynton through the CBI software stack. I have validated that almost all CRAN and Bioconductor packages can be installed with this new version.

Using R

To use R 4.5.0, which is the new default version, load it as:

{alice@dev3 ~}$ module load CBI r

Then you can run R interactively from the terminal using:

{alice@dev3 ~}$ R --quiet

> getRversion()
[1] '4.5.0'

To use R 4.5.0 in RStudio, just follow our RStudio documentation.

R packages must be re-installed

As usual when we move to a new version (e.g. from R 4.4 to R 4.5), any R packages installed in the previous version (R 4.4) are not available in the new version (R 4.5). This is not the case when we move from one patch version to another, e.g. R 4.5.0 to R 4.5.1. With the release of R 4.5.0 we have to start from scratch and reinstall any packages we need. So, don’t be surprised when library(dplyr) gives an error on “there is no package called ‘dplyr’”. Also, when installing your first package in a new version of R, R asks:

> install.packages("dplyr")
Warning in install.packages("dplyr") :
  'lib = "/wynton/home/cbi/shared/software/_rocky8/R-4.5.0-gcc13/lib64/R/library"'
  is not writable
Would you like to use a personal library instead? (yes/No/cancel)

Answer yes to this and anything else that R asks you to confirm. Doing so will make sure you get a smooth ride when using R. This is all explained in our R documentation.

Conda must be deactivated when using this R installation

Conda does not play well with other software tools installed on the system, especially not with programming tools such as Python and R. From experience working with Wynton users, Conda causes more problems for users than any other software tool on Wynton. When it comes to R, having Conda activated when installing an R package causes that R package to depend on your personal Conda setup. If your Conda setup gets updated later on, which it will, there is a great risk some of your R packages break. You will get hard-to-troubleshoot, obscure “library” errors when you try to load those R packages. It is a very tedious task trying to figure out which R packages are affected, so they can be re-installed.

In the past, module load CBI r would warn about these problems, if it detected that Conda is activated. However, some users did not understand the importance of that warning, and some users are unaware that they have Conda activated. Ignoring the warning had no immediate impact, which could lead users to think that “R seems to work fine with Conda.” Starting with R 4.5.0, module load CBI r will now give an error and refuse to load if Conda is activated, e.g.

(base) {alice@dev3 ~}$ module load CBI r
Lmod has detected the following error: Using the 'r' module when a Conda
environment is active risks resulting in hard-to-troubleshoot errors due
to library conflicts. Make sure to deactivate the currently active Conda
'base' environment before loading this module, e.g. 'conda deactivate'.

(base) {alice@dev3 ~}$ R --version
-bash: R: command not found

If you experience this, follow the instructions in the error message and deactivate Conda first, then retry:

(base) {alice@dev3 ~}$ conda deactivate
{alice@dev3 ~}$ module load CBI r

{alice@dev3 ~}$ R --version
R version 4.5.0 (2025-04-11) -- "How About a Twenty-Six"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

Installation has been well validated

Just as with previous versions of R available via the CBI stack, I have validated that nearly all R packages on CRAN and Bioconductor can be installed out of the box using this new R 4.5.0 installation.

Specifically, I have confirmed that 22,582 (99.1%) out of 22,3711 CRAN packages and 2,289 (99.2%) out of 2,3082 Bioconductor 3.21 software3 packages are straightforward to install. A small number of packages require some extra love - see our R documentation for guidance on installing those.

The 47 CRAN and 19 Bioconductor software packages that failed to install do so either because they depend on a system library that is not available on the cluster, or because they have bugs preventing them from being installed out of the box.

Footnotes

  1. CRAN: nrow(available.packages(repos = "https://cran.r-project.org"))↩︎

  2. Bioconductor: nrow(available.packages(repos = "https://bioconductor.org/packages/3.21/bioc"))↩︎

  3. I only validated installation of Bioconductor “software” packages. There are also Bioconductor “annotation-data”, “experiment-data”, and “workflow” packages, which I assume will install out-of-the-box.↩︎