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