Created
July 12, 2015 15:19
-
-
Save adomingues/b3f884fd2a93b2fbcd5d to your computer and use it in GitHub Desktop.
Word cloud for Martin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install.packages(c("wordcloud","tm"),repos="http://cran.r-project.org") | |
library("wordcloud") | |
library("tm") | |
message <- c( | |
rep("Good", 10), | |
rep("Luck", 9), | |
rep("Eyebrow", 3), | |
rep("Tatra Tea", 4), | |
rep("Sächsische Schweiz", 3), | |
rep("Movie Night", 7), | |
rep("Hiking", 5), | |
rep("Photography", 3), | |
rep("Beer", 5), | |
rep("Dresden", 3), | |
rep("Coilin", 4), | |
rep("snoRNA", 3), | |
rep("Cajal Bodies", 4), | |
rep("Biking", 4), | |
rep("Hela", 5), | |
rep("P19", 5), | |
rep("ChIP-seq", 5), | |
rep("iClip", 5), | |
rep("Pizza", 4), | |
rep("Horse Steak", 3), | |
rep("Slovenská Republika", 4) | |
) | |
m <- data.frame(table(message)) | |
pdf("MartinsCloud.pdf") | |
wordcloud(m$message, freq=m$Freq, | |
colors=rev(brewer.pal(9,"Set1")[c(1:5,7:9)]), | |
random.order=TRUE | |
) | |
dev.off() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment