twtr_get_urls: Extract and analyze URLs from tweets

Description Usage Arguments Value Examples

View source: R/twitter.R

Description

Get URLs from a vector of tweets, together with summaries about their usage; frequency, occurrences, percentages, and more

Usage

1

Arguments

x

a vector of tweets

Value

a list of data frames about the URLs

  1. urls: a matrix of occurences of the URLs, each row corresponding to a tweet.

  2. top_urls a data frame of the most frequently used URLs, sorted

  3. url_count: a data frame with one column, where each row shows the number of times the URL was used in the corresponding tweet.

  4. url_freq: a data frame showing the number of tweets where the URL was used once, where the URL was used twice, etc

  5. url_summary: a summary data frame shwoing the number of tweets, total URL count, unique URLs, and URLs per tweet

Examples

1
2
3
4
tweets <- c("this is my first #tweet with #two hashtags and one @mention http://t.co/foo",
"my second tweet has no hashtags and no mentions https://t.co/bar",
"my third #tweet #has #the most hashtags and @mentions @mention http://sub.domain/something")
twtr_get_urls(tweets)

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