19 May 2018

How to install R and R Studio on Ubuntu 16.04

The desktop installation of R is very simple if you are ok with Ubuntu's apt version.

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

Download the jpeg62 dependency from here and run dpkg to install it.
sudo dpkg -i libjpeg62_6b2-2_amd64.deb

Download R Studio from here and run dpkg to install it.
sudo dpkg -i rstudio-xenial-1.1.453-amd64.deb

That's it!


However, if you want the latest version (advisable if you plan to install packages like arules) or you want to upgrade the version installed above, follow this:
sudo gedit /etc/apt/sources.list
Enter this line in the sources.list file (substitute the right Ubuntu version. Xenial is for Ubuntu 16.04): deb http://cran.rstudio.com/bin/linux/ubuntu xenial/
sudo apt-get update
sudo apt-get install r-base

No comments: