using R and RStudio on linux (ubuntu 23.04)

1.3k Views Asked by At

I'm looking to start working with R and RStudio on my ubuntu installation.

I am having problems with updating/installing my packages, sudh as DESeq2. According to this post it is because r-base installs packages into protected os files.

I have followed this posts recommendation but I have not had success. Others recommend chmodding the relative paths...

I am really surprised that the r-base install has this issue. I can't seem to find an updated installation method that avoids the issue. I wanted to ask if anyone had any further advice for overcoming this?

I am also using conda environments, but I have installed R and RStudio into the base environment to avoid problems, I don't think it supports being run through a conda environment.

I've been using ubuntu for a year and I don't want to have a janky R installation to cause headache.

would appreciate all insight.

Cheers.

1

There are 1 best solutions below

1
Dirk is no longer here On

You can combine Ubuntu 23.04 (which I am running on laptop and server) with r2u offering you 20,000 binary (!!) packages with full dependency resolution. It also has about 250 BioConductor packages inferred by these packages.

You can also try it in Docker. I just did via

docker run --rm -ti rocker/r2u         # launches r2u for 22.04

followed by (now inside the container)

Rscript -e 'system.time(install.packages("DESeq2"))'

and it installed 52 (binary) packages in in 15.8 seconds. Now we have DESeq2, and it is under the control of apt and will get updates as apt gets them. See the r2u site for more.