Sunday, 2 June 2013

Came Across The R Project, Installing RTextTools

While I was searching Text Classification Machine Learning library for C++ I came across The R project. It is basically a library for statistics related programming which Machine Learning is all about.

So I found a library called RTextTools which uses R Project. I haven't yet used RTextTools so cannot comment about that. So I had to install RTextTools.

To install RTextTools, I will first have to install The R. Here I found all the instruction on how to install The R Project on Ubuntu. So the very first step given is to add the repository in your sources.list file
You will have to add the following line to your sources.list file which is present in /etc/apt/sources.list

deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu quantal/

Now replace <my.favorite.cran.mirror> according to your location. I live in India so I choose this.

http://ftp.iitm.ac.in/cran/ 

Take care of the duplicate http://. Now before updating your apt packages cache you will have to add the key of the repository which can be added using the following command which is also mentioned in the file I have mentioned above. 

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

Now you can issue the following command

$ sudo apt-get update

and then 

$sudo apt-get install r-base

After installing the above package, you can install the rtexttools by issuing the following commands

$ sudo R

The above command will take you to R console 

Now here you can issue the following command to install it.

install.packages("RTextTools")

Now this will install RTextTools. I will soon be posting on how to use RTextTools and its various function which Currently I also don't know. :)