Learn R Programming

PolitwoopsR (version 1.0)

url_expand: Expand shortened URLs in tweets

Description

Expand the shortened URLs in a deleted tweet data frame. This may take some time since every tweet has to go through the longurl.org API. Note also that many of deleted tweets have broken or wrong links - those of course cannot be expanded.

Usage

url_expand(tweets)

Arguments

tweets
A data frame of tweet info created with get_pw_tweets or merge_pw

Value

A vector of expanded URLs.

See Also

get_pw_tweets get_pw_pol merge_pw url_domain

Examples

Run this code
## Not run: 
# 
# tweet.df <- get_pw_tweets(1, 5)
# tweet.df$url.exp <- url_expand(tweet.df)
# 
#  ## End(Not run)

Run the code above in your browser using DataLab