If you are into Data Science field or involved with any Data Analytical research work, you will need the help of a Data Analytical tool to analyze the collected data. “R” is one of those very popular FOSS tool in the market now. You can get more details of R and related information form the CRAN web site. (http://cran.r-project.org/)

Once you install R, it gives you only a basic UI. As an alternative you can use RStudio (https://www.rstudio.com/) on top of installed R binaries. RStudio is a very much a user friendly interface which has many features to execute most of the R features.

Installing R

1. Update the repositories to get the latest R distributions:

Use sudo vi /etc/apt/sources.list to add the following:

deb http://cran.stat.ucla.edu/bin/linux/ubuntu precise/

OR

sudo add-apt-repository "deb http://cran.stat.ucla.edu/bin/linux/ubuntu precise/"

2. Get the repository SSL key and import it in to apt.

gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -

3. Update the repositories.

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

Now you may go to the command prompt and type R to get the R console.

Installing RStudio

There are two modes of installation in RStudio.

1. Desktop Version

2. Server Version (This is basically the preferred option mainly because of its ability to be accessed from anywhere on the network)

Installing RStudio (Desktop Version)

1. Visit www.rstudio.com and use http://www.rstudio.com/ide/download/desktop to download the latest binary available.

2. As a prerequisite, you are required to install R (R version 2.11.1 or higher). Follow steps given above to install R.

3. Extract the binary

sudo dpkg -i rstudio-0.xxx-amd64.deb

After extraction, a “RStudio” icon will be available to proceed.

Installing RStudio (The Server Version)

1. Visit www.rstudio.com and use http://www.rstudio.com/ide/download/server.html to download the latest binary available.

2. As a prerequisite, you are required to install R (R version 2.11.1 or higher). Follow steps given above to install R.

3. Use following steps to install all the dependencies related to RStudio.

32-bit

$ sudo apt-get install gdebi-core
$ sudo apt-get install libapparmor1  # Required only for Ubuntu, not Debian
$ wget http://download2.rstudio.org/rstudio-server-0.98.501-i386.deb
$ sudo gdebi rstudio-server-0.98.501-i386.deb

64-bit

$ sudo apt-get install gdebi-core
$ sudo apt-get install libapparmor1  # Required only for Ubuntu, not Debian
$ wget http://download2.rstudio.org/rstudio-server-0.98.501-amd64.deb
$ sudo gdebi rstudio-server-0.98.501-amd64.deb

4. Now use the following link to test the successful installation.

http://localhost:8787

Use your linux userid/password to log into the RStudio system. Thats all about it!

VN:F [1.9.22_1171]
Rating: 9.1/10 (8 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)
Installing R and RStudio on Ubuntu 12.04 LTS, 9.1 out of 10 based on 8 ratings