Quickly Install R on Ubuntu 17.10

Motivation

On a previous post I explained how to install R on Ubuntu 16.04 without further complications.

Now here are the equivalent steps on Ubuntu 17.10. The presented script also installs Java and common packages as I wrote this for a fresh install.

What do you need to do this?

Administrator (sudo) access to be able to install packages.

How do you do this?

This script will install everything.