twtr_get_mentions: Extract and analyze mentions from tweets

Description Usage Arguments Value Examples

View source: R/twitter.R

Description

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

Usage

1

Arguments

x

a vector of tweets

Value

a list of data frames about the hash tags

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

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

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

  4. mention_freq: a data.frame showing the number of tweets where one mention was used, where two mentions were used, etc

  5. mention_summary: a summary data.frame shwoing the number of tweets, total mention count, unique mentions, and mentions 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_mentions(tweets)

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