tweet_gettr: Tweet GettR

Description Usage Arguments Value Examples

View source: R/tweet_gettr.R

Description

This function lets you scrape the timeline of any twitter user.

Usage

1
2
3
4
5
6
7
8
9
tweet_gettr(
  handle,
  token = NULL,
  output = "",
  n = 3200,
  includeRts = FALSE,
  includeReplies = FALSE,
  sentiments = NULL
)

Arguments

handle

The handle of the twitter user's timeline you wish to scrape.

token

Token. The token generated by setup_twitteR.

output

The location of an output text file that you can re-use if you want a re-usable file of tweets. Defaults to a blank string, no output saved.

n

Integer. Defaults to '3200'. The number of tweets to pull.

includeRts

Boolean. Defaults to 'FALSE'. Whether or not to include re-tweets.

includeReplies

Boolean. Defaults to 'FALSE'. Whether or not to include replies.

sentiments

Dataframe. Dataframe containing words and their sentiments. Columns MUST be "word" and "sentiment"

Value

Returns a properly-formatted list that you can run make_sentence on

Examples

1
tweet_gettr("@realDonaldTrump", "./trump.txt")

serrat839/package documentation built on May 29, 2020, 10:54 a.m.