Pageviews

Wednesday 11 March 2015

How to create a WordCloud in R

by Unknown  |  in R at  Wednesday, March 11, 2015

R, the open source package, has become the de facto standard for statistical computing and anything seriously data-related (note I am avoiding the term ‘big data’ here – oops, too late!).  From data mining to predictive analytics to data visualisation, it seems like any self-respecting data professional now uses R. Or at least they pretend to. We all know that most people use Excel when nobody’s watching.

Wordcloud comes under Text mining process in R.Text mining means we are provided with a bunch of text documents and we need to extract different trends regarding the trends of text in the documents i.e the most used keywords in the documents.

1.Create a Corpus:

For creating a word cloud in R,we need to create a corpus of text,so that tm package can process it.A corpus is a collection of documents.

2.Apply Text Mining functions on the Corpus

In the tm package,there are various functions for mining your text i.e converting to lowercase,removing punctuation,removing stopwords etc.

3.Creating a WordCloud:

Now we need to pass the arguments to the wordcloud function and display the result.


0 comments:

Proudly Powered by Blogger.