UBUNTU 16.04

Option 1:

sudo apt-get install -y r-base r-base-dev libcurl4-openssl-dev libssl-dev build-essential

Option 2 (to get newer R version):

with PPA. ref digitalocean

sudo apt install apt-transport-https && \

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825......