twtr_get_hashtags: Extract and analyze hashtags from tweets

Description Usage Arguments Value Examples

View source: R/twitter.R

Description

Get the hashtags from a vector of tweets, together with summaries about the usage of those hashtags; frequency, occurrences, percentages, and more

Usage

1

Arguments

x

a vector of tweets

Value

a list of data frames about the hash tags

  1. hashtags: a matrix of all hashtags used, each row corresponding to a tweet.

  2. top_hashtags: a data.frame of the top hashtags, showing the frequency of usage, and sorted in descending order.

  3. hash_count: a data.frame with one column, where each row shows the number of hashtags used in the corresponding tweet.

  4. hash_freq: a data.frame showing the number of tweets where one hashtag was used, where two hashtags were used, etc

  5. hashtag_summary: a summary data.frame shwoing the number of tweets, total hashtag count, unique hashtags, and hashtags per tweet

Examples

1
2
3
4
tweets <- c("this is my first #tweet with #two hashtags and one @mention",
"my second tweet has no hashtags and no mentions",
"my third #tweet #has #the most hashtags and @mentions @mention")
twtr_get_hashtags(tweets)

eliasdabbas/radvertools documentation built on May 7, 2019, 1:30 p.m.