The following is how I configured my R workspace (and Rstudio) and this was first shared on a Coursera’s “Getting and Cleaning Data” course forums.
First make sure that R is version 3+. If not update it according to this stackoverflow question.
Java for rJava
Install Java (needed for rJava) first from a terminal:
sudo apt-get install openjdk-6-jre
which will install openjdk-6-jdk.
If this doesn’t work install all its packages:
sudo apt-get install openjdk-6-*
OR you might prefer openjdk-7-jdk
sudo apt-get install openjdk-7-*
You should find that it is installed using this command: