Advertisements

R and Big Data

Now R programming is getting more attention among people. The reason I found was that it can be used efficiently for big data analytics. R is a good statistical tool. Its applicability in big data analytics is very much. Now the system is trying to learn from data or else we are trying to teach the system using data. With advanced analytics with R programming, it is very easy to generate insights from large data. Now a lot of packages are available for R that makes it powerful and capable to work on top of latest Big data technologies. Some of the libraries that I have noticed are listed below.

1) Rhipe: RHIPE (hree-pay’) is the R and Hadoop Integrated Programming Environment.
For more details Rhipe

2) Rhive : RHive is an R extension facilitating distributed computing via Apache Hive.
For more details Rhive

3) Rhbase : This R package provides basic connectivity to HBASE, using the Thrift server. R programmers can browse, read, write, and modify tables stored in HBASE.
For more details Rhbase

4) Rhdfs : This R package provides basic connectivity to the Hadoop Distributed File System. R programmers can browse, read, write, and modify files stored in HDFS.
For more details Rhdfs

5) Rmr : This R package allows an R programmer to perform statistical analysis via MapReduce on a Hadoop cluster.
For more details Rmr

6) Plyrmr : This R package enables the R user to perform common data manipulation operations, as found in popular packages such as plyr and reshape2, on very large data sets stored on Hadoop. Like rmr, it relies on Hadoop mapreduce to perform its tasks, but it provides a familiar plyr-like interface while hiding many of the mapreduce details.
For more details Plyrmr

7) Rmongo : MongoDB Database interface for R. The interface is provided via Java calls to the mongo-java-driver.
For more details Rmongo

Advertisements

RStudio Installation

RStudio is an IDE for R. It will make the R programming more user friendly.

Here I am explaining the way to install RStudio in linux machines.
RStudio needs R. So before installing RStudio, we have to install R. Installation of R is explained in my previous post.
R-3.0.0 needs RStudio-0.97 or above.
We can download Rstudio server rpm from the below website http://www.rstudio.com/ide/download/
Then install it using the command

rpm –ivh <rpm-name>

Sometimes it may show dependency issues.
Install the necessary dependencies and go ahead.

After that start R-Studio server.

/etc/init.d/rstudio-server start

If the installation is done correctly it will start.
You can verify the installation using the command

sudo rstudio-server verify-installation

Then go to webbrowser (Mozilla, chrome) and type the url
http://ipaddress:8787

8787 is the default port, you can change this by editing the configuration file.
All the users in the linux except the system users(whose userid lower than 100) can use rstudio.
The credentials are the same as linux credentials.

R Installation in Linux Platforms

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()