Tag Archives: word cloud

I can’t resist a word cloud: now using R!

wcloud

Top 1000 words in FriendFeed comments, ISMB 2008-2011

The wordcloud package is word clouds for R with a difference: they look great.

Of course, having just analysed online coverage of the ISMB conference, I had to run all 6 906 comments from the 2008-2011 meetings through some code. If you followed along via the Sweave code, I went as far as generating the data frame of comments, ismb.comments, then pulled the comment text into a new data frame using:

data.frame(ismb.comments$body)

It was then simply a case of following along with the excellent example code from the post Word Cloud in R, over at One R Tip A Day, limiting myself to the 1000 most-used words. Watch out, the TermDocumentMatrix() function from the tm package uses quite a lot of memory.

Result shown at right: click image for full-size version. I think that word in the centre says it all.

Abstract word clouds using R

A recent question over at BioStar asked whether abstracts returned from a PubMed search could easily be visualised as “word clouds”, using Wordle.

This got me thinking about ways to solve the problem using R. Here’s my first attempt, which demonstrates some functions from the RCurl and XML packages.

update: corrected a couple of copy/paste errors in the code
Read the rest…