Get startedGet started for free

Retweet counts

A retweet helps utilize existing content to build a following for your brand.

The number of times a twitter text is retweeted indicates what is trending. The inputs gathered can be leveraged by promoting your brand using the popular retweets.

In this exercise, you will identify tweets on "Artificial Intelligence" that have been retweeted the most.

Tweets on "Artificial Intelligence", extracted using search_tweets(), have been saved as tweets_ai.

The rtweet and dplyr libraries and the dataset tweets_ai have been pre-loaded.

This exercise is part of the course

Analyzing Social Media Data in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Create a data frame of tweet text and retweet count
rtwt <- tweets_ai[,c("___", "___")]
head(rtwt)

# Sort data frame based on descending order of retweet counts
rtwt_sort <- arrange(rtwt, desc(___))
Edit and Run Code