install

First install R itself and then Rstudio. Follow the steps below depending on your operating system.
Jump to section: Windows, Mac, Linux, Manjaro

Windows

  • install R
  • install Rstudio
  • change the .RData settings to enhance reproducibility

Mac

Either

  • install homebrew
  • in the Mac terminal, run brew install --cask r and brew install --cask rstudio
  • change the .RData settings to enhance reproducibility

or

  • install Xquartz
  • from cran.r-project.org/bin/macosx, download the latest release, e.g. R-4.1.2.pkg
  • open the file with ‘Installer’ and follow the instructions
  • install Rstudio
  • drag the app to the ‘Applications’ folder
  • change the .RData settings to enhance reproducibility

Linux

Install R on Linux Ubuntu (supported versions) so that sudo apt upgrade installs the latest R version if outdated (sources: Kris Eberwein, Dean Attali, Lisa Tagliaferri):

  • open a terminal (CTRL+ALT+T) and paste (CTRL+SHIFT+V) the following lines one by one.
    On Linux Mint, replace $(lsb_release -cs) with e.g. focal, as listed.
    On Debian, find the link here.
sudo echo "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" | sudo tee -a /etc/apt/sources.list

Check /etc/apt/sources.list manually for the correct link (as referenced above). Make sure there is a / at the end.
For the next step, other keys may be needed, e.g. 95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt update
sudo apt install r-base r-base-dev
sudo apt -y install r-base gdebi-core
sudo gdebi rstudio-2021.09.1-372-amd64.deb
  • change the .RData settings to enhance reproducibility

Manjaro Linux

  • enable AUR
  • search for rstudio-desktop and install it. R will be installed with it. This may take up to an hour.
    (Instructions by Frank de Boer).
  • change the .RData settings to enhance reproducibility