nwd_get_tweets: Searches keywords on Twitter.

Description Usage Arguments Value

View source: R/get_tweets.R

Description

It assumes that a valid token is already present in the working environment. For details, see https://rtweet.info/articles/auth.html

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
nwd_get_tweets(
  keywords = NULL,
  date = NULL,
  language = NULL,
  n_keywords = 10,
  n_tweets = 1000,
  tweet_type = "recent",
  wait = 10,
  store = TRUE
)

Arguments

keywords

A character vector or a data frame, with keywords in the first column. Defaults to NULL. If NULL, tries to import previously stored keywords for given language and date. If a data frame, it assumes that the first columns includes the keywords. If a character vector, it processes it directly.

date

Used to find keywords locally, if none are provided. Defaults to latest available. To systematically get data for the previous day, use 'Sys.Date()-1'

n_keywords

An integer, defaults to NULL.

n_tweets

An integer. Number of tweets to request.

tweet_type

Passed to 'rtweet'. Defaults to "recent". Other valid types include "mixed" and "popular".

Value

A data.frame (a tibble) with 'n' number of rows and two columns, 'words' and 'n' for number of occurrences.


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