Learn R Programming

WeatherSentiment (version 1.0)

word_cloud_tweet: Generate Word Cloud from Tweet Text

Description

This function generates a word cloud visualization of the most frequent words in a tweet after basic cleaning. Stop words and words less than 3 characters are removed.

Usage

word_cloud_tweet(tweet)

Value

void (generates a word cloud image).

Arguments

tweet

A character string containing the text of the tweet.

Author

Leila Marvian Mashhad and Andriette Bekker and Mohammad Arashi and Priyanka Nagar.

Examples

Run this code
# Generate word cloud from a single tweet
tweet_text <- "This is a sample tweet for word cloud generation!"
word_cloud_tweet(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