R compatibility on Ubuntu 20.04 & 20.10

Linux based operating systems operate on a different paradigm than Windows and macOS. Software is stored in a repository that is accessed through a package manager like ‘apt’ on Debian-based operating systems including Ubuntu. However, in the case of R, the version present in the repositories is out of date quickly, potentially causing compatibility issues between the local version and the server version for those that have access to remote computing. In order to update to the latest version of R reliably, a different source must be added to the /etc/apt/sources.list file. This will reliably update the system with the latest version of R.

The issue with this approach is there are often unmet dependencies when installing R packages, and without those dependencies, the package install fails. When I was installing the tidyverse meta-package on my Ubuntu-based system, the install failed and gave no indication of what could be done to fix it. The workaround for this is to install each package that is a part of tidyverse separately so the appropriate errors are shown. This approach finally gave a helpful error which said libcss-dev was missing and needed to be installed. I installed it using apt from the terminal and then went to install tidyverse again from the R console and it worked.

On Windows and macOS updating requires downloading a new version of R directly from the R project site in a web browser. I found this approach for package management if you can call it that, annoying and would always require loading all the packages that were installed before to be reinstalled. Updating R on Linux is still preferred, but I wish it could still be a bit easier, so I can confidently recommend it for new users.


Posted

in

, ,

by

Tags:

Comments

Leave a Reply