downloadTweets {needmining} | R Documentation |
Downloading Tweets based on a keyword list
Description
downloadTweets
downloads Tweets containing specified keywords from the Twitter API
Usage
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
searchterm <- '"smart speaker" OR "homepod" OR "google home mini"'
## Not run:
token <- twitterLogin()
currentTweets <- downloadTweets(searchterm, n = 180)
## End(Not run)
[Package needmining version 0.1.1 Index]