Generate word cloud

generate_cloud(tweets, type = "words")

Arguments

tweets

A vector of tweets

type

One of "words", "hashtag", "stopwords", default="words". Type of content to show in wordcloud. "words" shows all words, "hashtag" only shows hashtags, and "stopwords" does not show common English words.

Value

A dataframe containing words and their associated frequencies

Examples

tweets <- c("Make America Great Again! @DonaldTrump #America",
"It's rocket-science tier investment~~ #LoveElonMusk",
"America America America always GREAT",
"make america great again! #AMERICA")
cloud_df <- generate_cloud(tweets)