R is a free software that is for statistical and analytical computations. It is a very good tool for graphical computations also.
R is used in a wide range of areas. R allows us to carryout statistical analysis in an interactive model.
To use R, first we need to install R program in our computer. R can be installed windows, Linux, Mac OS etc.

In Linux platforms, we usually install by compiling the tarball.
The latest stable version of R as of now is R-3.0.0
Installation of R in Linux platforms is explained below.

Installation Using rpm

If you are using Redhat or CentOS distribution of linux, then you can either install using tarballs or rpm.
But latest versions may not be available as rpm.
Installation using rpm is simple.
Just download the rpm files with dependencies and install each using the command

rpm –ivh <rpm-name>

Installation Using yum

If you are having Internet connection,
Then installation is very simple.
Just do the following commands.

yum install R-core R-2*

Installing R using tarball

R is available as tarball which is compatible with all  linux platforms.
Latest versions of R are available as tarball.

The installation steps are given below.
Get the latest R tar file  for Linux from http://ftp.iitm.ac.in/cran/

Extract the tarball

tar   –xzvf   R-xxx.tar.gz

Change the permission of the extracted file

chmod –R 755 R-xxx

then go inside the extracted R directory and do the following steps

 cd   R.xxx
./configure  --enable-R-shlib

The above step may fail because of the lack of dependent libraries in your OS.
If it is failing, install the dependent libraries and do the above step again.
If this is done successfully, do the following steps.

make

make install

 

After this set the R_HOME and PATH in /etc/bashrc (Redhat or CentOS) or ~/.bashrc (if no root privilege) or /etc/bash.bashrc (Ubuntu)

export R_HOME= <path to R installation>
export PATH=$PATH:$R_HOME/bin

 

Then do the following command

source /etc/bashrc  (For Redhat or CentOS)

Or

source /etc/bash.bashrc    (If no root privilege)

Or

source ~/.bashrc   ( For Ubuntu)

 

Check R installation

Type R in your terminal

If R prompt is coming, your R installation is successful.

You can quit from R by using the command q()