Learn R Programming

DisasterAlert (version 1.0.0)

generate_word_clouds: Generate Word Clouds from Tweets

Description

This function Creates and plots a word cloud based on the cleaned and stemmed words extracted from one or more tweets.

Usage

generate_word_clouds(tweet)

Value

The main side effect is the word cloud drawing.

Arguments

tweet

A character vector of tweet texts, or a data frame/tibble whose first column contains tweet texts.

Author

Hossein Hassani and Leila Marvian Mashhad and Nadejda Komendantova.

Examples

Run this code
# Generate word cloud from a single tweet
tweet_text <- "This is a sample tweet for word cloud generation!"
generate_word_clouds(tweet_text)

## This will generate a word cloud image where the most frequent words 
## in the tweet will be displayed larger.

Run the code above in your browser using DataLab