Skip to content

Instantly share code, notes, and snippets.

@CliffordAnderson
Last active December 31, 2015 20:29
Show Gist options
  • Save CliffordAnderson/8040521 to your computer and use it in GitHub Desktop.
Save CliffordAnderson/8040521 to your computer and use it in GitHub Desktop.
A brief R script to generate tag clouds of the primary words used by characters (in the case, Leonato) in Shakespeare's *Much Ado about Nothing*.
words <- read.csv(file.choose(), header=FALSE)
leonato <- subset(words, V1=="LEONATO", select=c(V2, V3))
pal <- brewer.pal(8, "Accent")
wordcloud(leonato$V2, leonato$V3, min.freq=3, colors=pal)
@CliffordAnderson
Copy link
Author

Uses Iain Fellows' wordcloud package

@CliffordAnderson
Copy link
Author

Leonato Word Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment