nwd_expand_urls: Extract links from tweets and expands shortened urls

Description Usage Arguments Value

View source: R/extract_urls_from_tweets.R

Description

Extract links from tweets and expands shortened urls

Usage

1
nwd_expand_urls(urls, n_char = 30, n_retry = 1)

Arguments

urls

A character vector of urls, or a data frame of tweets, as created by 'rtweet'.

n_char

An integer, defaults to 30. Number of characters in the url: only urls shorter than n_char will be expanded, others will be kept as they are.

n_retry

An integer, defaults to 1. Number of times it tries to expand urls if first attempt fails. Set to 0 for attempting only once.

Value

A data.frame (a tibble) with 9 columns: "user_id", "status_id", "created_at", "screen_name", text", "orig_url","expanded_url", "status_code", "url"


giocomai/networkedwebsitesdetector documentation built on Jan. 22, 2021, 5:42 p.m.