Install R and RStudio on Ubuntu 16.04

Basic information extracted from The Comprehensive R Archive Network webiste.

The packages you need to run R on Ubuntu are available in the Ubuntu repositories, but updated only for each LTS release. If you want to keep R up to date, you will need to install the Launchpad PPA repository. I selected a mirror from the CRAN mirrors website.

These Ubuntu archives are also available on CRAN, but these are signed with the key of “Michael Rutter” with key ID E084DAB9. If you decide to use the archives on CRAN, you first need to  add the key to your system.


Using CRAN

$ sudo apt-key adv --keyserver --recv-keys E084DAB9
$ sudo deb xenial/

OR… use a mirror

$ sudo deb xenial/

Retrieve the updated package lists

$ sudo apt-get update

Install the packages

$ sudo apt-get install r-base

Users who need to compile R packages from source [e.g. package maintainers, or anyone installing packages with install.packages()] should also install the r-base-dev package:

$ sudo apt-get install r-base-dev





One thought on “Install R and RStudio on Ubuntu 16.04

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s