The contents of this tutorial is geared toward downloading and installing R the statistical programming language on:

Click one of the above links to be taken to the appropriate installation section.

What is R?

Before downloading or installing any software, it may help to have a bit of a background as to what you are obtaining. Thus, let’s briefly look at “What is R?”

R is:

  • a language designed specifically for statistical computing and graphics
  • an interactive interface to many different tools.
  • based on the S language, which was developed by Bell laboratories in the late 1970s.
  • an open source (e.g. free) project that is cross platform (macOS, Windows, and Linux)
  • available on The R Project for Statistical Computing website

Downloading and Installation of R

The R project offers a distributed content delivery network at that allows for the R installer to be downloaded geographically nearest to where you live. Within this site, there are also additional resources. I’ve summarized the key points of these resources below.


The R for Windows installer is available here:

Insert screenshots when R 3.4.1 is released on June 20th


The macOS installer for R is obtainable here:

Insert screenshots when R 3.4.1 is released on June 20th


Depending on the Linux distribution being used, there are slightly different sets of commands required to download and install R via the command line.

Instructions for each Linux distribution with official R support are given at:


Official instructions:

# Extract OS distribution codename
DISTRIBUTION_CODENAME=`grep DISTRIB_CODENAME /etc/lsb-release | cut -c 18-`

# Appends the CRAN repository to your sources.list file 
sudo sh -c 'echo "deb $DISTRIBUTION_CODENAME" >> /etc/apt/sources.list'

# Add GPG key of Michael Rutter the Ubuntu archives CRAN maintainer 
sudo apt-key adv --keyserver --recv-keys E084DAB9

sudo apt-get update
sudo apt-get install r-base r-base-dev

N.B. Many R packages can be installed and managed by apt-get instead of install.packages(). R packages are available under the name r-cran-*. If opting for this route, make sure to install with dependencies using:

sudo apt-get build-dep r-cran-pkgname


Official instructions:

See the supported branch discussion regarding the necessary R repositories.

# Repository for jessie 
deb jessie-cran34/

# Use multithreaded basic linear algebra subprogram
sudo apt-get install libatlas3-base
# Install R and R dev
sudo apt-get install r-base r-base-dev

Redhat / CentOS

Official instructions:

To use R with RedHat distributions, you will need to add an additional repository of packages known as the Extra Packages for Enterprise Linux (EPEL).

Instructions for adding the repository can be found here:

## Obtain the correct version of EPEL for the RHEL system. 
## RHEL5
# su -c 'rpm -Uvh'

## RHEL6
# su -c 'rpm -Uvh'

## RHEL7
# su -c 'rpm -Uvh'

sudo yum update
sudo yum install R


Official instructions:

One-click installers are available here:

Otherwise, the following terminal commands will suffice:

# Set the correct repository for SUSE version
VERSION=$(grep VERSION /etc/SuSE-release | sed -e 's/VERSION = //')
zypper addrepo -f \\:/languages\:/R\:/patched/openSUSE_$VERSION/ \

# Install R
zypper install R-base R-base-devel

# Update R when new versions are released
zypper update R-base