Build Word Clouds for Visualization Purposes
# Build a General Word Cloud
set.seed(1234)
wordcloud(words = spam_ham_df$text, min.freq = 1,
max.words=200, random.order=FALSE, rot.per=0.35,
colors=brewer.pal(8, "Dark2"))
## Warning in tm_map.SimpleCorpus(corpus, tm::removePunctuation):
## transformation drops documents
## Warning in tm_map.SimpleCorpus(corpus, function(x) tm::removeWords(x,
## tm::stopwords())): transformation drops documents
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : phoboslabsnetnoteinccom could not be fit on page. It will not be
## plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : xmailmanversion could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : w142z064000057nycnydslcncnet could not be fit on page. It will not
## be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : 10298824683116tmdadeepeddyvirciocom could not be fit on page. It
## will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : 132581030015585munnariozau could not be fit on page. It will not be
## plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : 1721652254 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : compiled could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : d03e543c36 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : developers could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : exmhworkers could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : exmhworkerslistmanspamassassintaintorg could not be fit on page. It
## will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : ftocpickmsgs could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : fuchsiacsmuozau could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : g7mbqpw13260 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : g7mby7g11259 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : g7mby7y11255 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : g7mbyrz04811 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : hand could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : happening could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : httpslistmanredhatcommailmanlistinfoexmhworkers could not be fit on
## page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : httpslistmanspamassassintaintorgmailmanprivateexmhworkers could not
## be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : listsubscribe could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : listunsubscribe could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : maillocalhost could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : mailtoexmhworkersrequestredhatcomsubjectunsubscribe could not be fit
## on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : mhparam could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : obviously could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : popup could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : reach could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : repeatable could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : reproduce could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : sequences could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spam_ham_df$text, min.freq = 1, max.words =
## 200, : zzzzlocalhostnetnoteinccom could not be fit on page. It will not be
## plotted.

# spam word cloud
set.seed(1234)
wordcloud(words = spamDF$text, min.freq = 1,
max.words=200, random.order=FALSE, rot.per=0.35,
colors=brewer.pal(8, "Dark2"))
## Warning in tm_map.SimpleCorpus(corpus, tm::removePunctuation):
## transformation drops documents
## Warning in tm_map.SimpleCorpus(corpus, function(x) tm::removeWords(x,
## tm::stopwords())): transformation drops documents
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## g72lqwv13294 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## greetings could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## httpwwwlinuxiemailmanlistinfoilug could not be fit on page. It will not be
## plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## income could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## insanity could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## jmilugjmasonorg could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## landed could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## lifechanging could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## lugh could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## mailing could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## maintainer could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## meaning could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## message could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## messageid could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## mimeversion could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## mistake could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## money could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## most could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## necessary could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## numerous could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## opportunities could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## page could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## past could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## period could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## permission could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## phobos could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## pitch could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## postfix could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## precedence could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## returnpath could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## sacred could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## sender could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## services could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## siddhi could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## signup could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## smtpd32706 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## something could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## start could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## startnow2002hotmailcom could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## state could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## stop could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## textplain could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## think could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## truth could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## unsolicitated could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## unsolicited could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## unsubscription could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## used could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## way could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## why could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## with could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## within could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## wonder could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## words could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## xbeenthere could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words = 200, :
## xmailmanversion could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = spamDF$text, min.freq = 1, max.words =
## 200, : yyyylocalhostnetnoteinccom could not be fit on page. It will not be
## plotted.

# ham word cloud
set.seed(1234)
wordcloud(words = hamDF$text, min.freq = 1,
max.words=200, random.order=FALSE, rot.per=0.35,
colors=brewer.pal(8, "Dark2"))
## Warning in tm_map.SimpleCorpus(corpus, tm::removePunctuation):
## transformation drops documents
## Warning in tm_map.SimpleCorpus(corpus, function(x) tm::removeWords(x,
## tm::stopwords())): transformation drops documents
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## httpslistmanspamassassintaintorgmailmanlistinfoexmhworkers could not be fit
## on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## 102994306626919tmdadeepeddyvirciocom could not be fit on page. It will not
## be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## 1029944441398tmdadeepeddyvirciocom could not be fit on page. It will not be
## plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## 132581030015585munnariozau could not be fit on page. It will not be
## plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## deltacoepsuacth could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## developers could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## dogmaslashnullorg could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## exmhworkers could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## exmhworkerslistmanspamassassintaintorg could not be fit on page. It will
## not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## ftocpickmsgs could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## fuchsiacsmuozau could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## g7mbihl25223 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## g7mbqpw13260 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## g7mbwel29762 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## g7mby7g11259 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## g7mby7y11255 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## g7mbyrz04811 could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## happening could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## httpslistmanredhatcommailmanlistinfoexmhworkers could not be fit on page.
## It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## httpslistmanspamassassintaintorgmailmanprivateexmhworkers could not be fit
## on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## intmx1corpredhatcom could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## kremunnariozau could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## listarchive could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## listhelp could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## listsubscribe could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## listunsubscribe could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## mailing could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## maillocalhost could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## mailtoexmhworkersrequestredhatcomsubjectsubscribe could not be fit on page.
## It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## mailtoexmhworkersrequestredhatcomsubjectunsubscribe could not be fit on
## page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## mailtoexmhworkersrequestspamassassintaintorgsubjecthelp could not be fit on
## page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## mailtoexmhworkersspamassassintaintorg could not be fit on page. It will not
## be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## marking could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## mhparam could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## mimeversion could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## munnariozau could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## obviously could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## popup could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## precedence could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## reach could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## references could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## relevant could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## repeatable could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## repository could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## reproduce could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## returnpath could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## robert could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## routing could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## sequences could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## since could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## singledrop could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## syntax could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## textplain could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## tkerror could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## today could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## window could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## without could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## xbeenthere could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## xmailmanversion could not be fit on page. It will not be plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## zzzzexmhspamassassintaintorg could not be fit on page. It will not be
## plotted.
## Warning in wordcloud(words = hamDF$text, min.freq = 1, max.words = 200, :
## zzzzlocalhostnetnoteinccom could not be fit on page. It will not be
## plotted.
