downloadTweets: Downloading Tweets based on a keyword list

Description Usage Arguments Details Value Author(s) Examples

View source: R/downloadTweets.R

Description

downloadTweets downloads Tweets containing specified keywords from the Twitter API

Usage

1
downloadTweets(search_terms, n = 100, lang = "en")

Arguments

search_terms

a string containing the search terms in Twitter format (use OR and AND to connect multiple search terms in one search)

n

The number of Tweets downloaded. Please note that this limit is based on your Twitter account

lang

The language of the Tweets. Default is English. Please refer to the Twitter API documentation for language codes

Details

This function downloads Tweets for a specified keyword list, removes line breaks, adds a column isNeed filled with 0

Value

a data frame containing the tweets as well as an additional column isNeed filled with 0

Author(s)

Dorian Proksch <dorian.proksch@hhl.de>

Examples

1
2
3
4
5
6
searchterm <- '"smart speaker" OR "homepod" OR "google home mini"'
## Not run: 
token <- twitterLogin()
currentTweets <- downloadTweets(searchterm, n = 180)

## End(Not run)

needmining documentation built on May 1, 2019, 8:36 p.m.