Delete comment from: One R Tip A Day
Paolo said...
Try something like this:
Put your data in a file phrases.txt with a single phrase for each raw:
all work and no play
makes jack
a dull boy
1) Import the phrases in R
my.phrases <- scan("phrases.txt", what="char", sep="\n")
2) import or create a vector with the frequencies (convert your order of importance in same way to frequencies), e.g.
my.freq <- c(10,20,15)
3) Plot the wordcloud
library(wordcloud)
wordcloud(my.phrases, my.freq)
May 16, 2012, 10:38:46 PM
Posted to Word Cloud in R

