clean_tweets: Clean text of tweets

View source: R/clean_tweets.R

clean_tweetsR Documentation

Clean text of tweets

Description

Removes from the text, users mentions, hashtags, urls and media. Some urls or other text might remain if it is not recognized as an entity by the API.

Usage

clean_tweets(x, clean = c("users", "hashtags", "urls", "media"))

Arguments

x

Tweets

clean

Type of elements to be removed.

Value

A vector with the text without the entities selected

Examples

if (auth_has_default()) {
tweets <- search_tweets("weather")
tweets

# tweets
clean_tweets(tweets)
}

rtweet documentation built on Oct. 17, 2023, 1:11 a.m.