R installation on Linux

Table of Contents
Motivation
At Wageningen University & Research the Linux Operating System is supported on a best effort principle, meaning that it is supported as far as the knowledge of Facilities and Services Information Technology (FB-IT) reaches. FB-IT is supported by their colleagues maintaining the High Performance Computing Cluster Anunna, who have a lot of knowledge about the Linux Operating System, because it’s the Operating System used by Anunna.
On the other hand Linux users are generally users, who are very independent and know how to search for and implement solutions themselves. Being one of those Linux users within WUR myself I want to share in this post, how I have installed R on my Linux Systems within Wageningen University & Research.
This post will show how to install R on a Linux desk- or laptop computer.
Two types of Linux Operating Systems are described:
- Debian based, e.g. LMDE 5 Elsie (based on Debian 11 Bullseye)
- Ubuntu based, e.g. Linux Mint 20.3 (based on Ubuntu 20.04.4 LTS a.k.a. Focal Fossa)
Installation R
Debian based Linux Operating System
The installation procedure described here, combines information as provided on https://cloud.r-project.org/bin/linux/debian/. At the time of writing this post the described procedure installs R version 4.2.0 (nicknamed: Vigorous Calisthenics), under the assumption that the Linux Operating System is based on Debian 11 Bullseye.
- Open a terminal (CTRL+ALT+T) and log in as administrator using the console command:
sudo -i
- Fetch and import the current key using the following command:
apt-key adv --keyserver keyserver.ubuntu.com --recv-key '95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7'
- Add Debian bullseye repository to the software sources using the command:
add-apt-repository "deb http://cloud.r-project.org/bin/linux/debian bullseye-cran40/"
- Update the package information from all configured sources:
apt update
- Fully install R with dependencies:
apt install r-base libatlas3-base libopenblas-base r-cran-littler r-cran-coda r-doc-info r-doc-pdf python3-rpy2 r-mathlib
- Exit out of administrator mode using the
exit
command.
Ubuntu based Linux Operating System
The installation procedure described here, combines information as provided on https://cloud.r-project.org/bin/linux/ubuntu/fullREADME.html. At the time of writing this post the described procedure installs R version 4.2.0 (nicknamed: Vigorous Calisthenics), under the assumption that the Linux Operating System is based on Ubuntu 20.04.4 LTS Focal Fossa.
- Open a terminal (CTRL+ALT+T) and log in as administrator using the console command:
sudo -i
- Fetch and import the current key using the following command:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
- Add Ubuntu Focal Fossa repository to the software sources using the command:
add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/"
- Update the package information from all configured sources:
apt update
- Fully install R with dependencies:
apt install r-base r-cran-littler r-cran-rodbc r-doc-info r-doc-pdf r-mathlib elpa-ess ess jags littler python3-rpy2
- Exit out of administrator mode using the
exit
command.