install
First install R itself and then Rstudio. Follow the steps below depending on your operating system.
Jump to section: Windows, Mac, Linux, Manjaro
Mac
Either
- install homebrew
- in the Mac terminal, run
brew install --cask r
andbrew 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.jammy
ornoble
, 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
- install Rstudio
- either install that, or on Ubuntu 20.04 (see LinuxConfig):
sudo apt -y install r-base gdebi-core
sudo gdebi rstudio-2021.09.1-372-amd64.deb