tweet_corpus: Submit a search query (terms separated by "+") and get a...

Description Usage Arguments Value Examples

View source: R/TwitterAPI.R

Description

Submit a search query (terms separated by "+") and get a return set of data (corpus).

Usage

1
2
tweet_corpus(search, n = 5000, since = NULL, until = NULL,
  sinceID = NULL, maxID = NULL, ...)

Arguments

search

Search query to issue to twitter. Use "+" to separate query terms.

n

The maximum number of tweets to return

since

If not NULL, restricts tweets to those since the given date. Date is to be formatted as YYYY-MM-DD

until

If not NULL, restricts tweets to those up until the given date. Date is to be formatted as YYYY-MM-DD

sinceID

If not NULL, returns tweets with IDs greater (ie newer) than the specified ID

maxID

If not NULL, returns tweets with IDs smaller (ie older) than the specified ID

Value

A list containing a vector of all doc and a data.frame of all tweets

Examples

1
2
setupTwitterConn()
tweets <- tweet_corpus(search = "audusd OR aud_usd OR aud/usd", n = 1000, since = as.character(Sys.Date()-1), until = as.character(Sys.Date()))

ivanliu1989/RQuantAPI documentation built on Sept. 13, 2019, 11:54 a.m.