Usage
CollectDataTwitter(searchTerm, numTweets, verbose, writeToFile, language, since,
until, locale, geocode, sinceID, maxID, resultType, retryOnRateLimit)
Arguments
searchTerm
character string, specifying a search term or phrase (e.g.
"Australian politics") or hashtag (e.g. "#auspol"). Many query operators are
available - see the Twitter documentation for more information:
https://dev.twitter.com/rest/public/search
numTweets
numeric integer, specifying how many tweets to be
collected. Defaults to 1500. Maximum tweets for a single call of this
function is 1500.
verbose
logical. If TRUE
then this function will output
runtime information to the console as it computes. Useful diagnostic tool
for long computations. Default is FALSE
.
writeToFile
logical. If TRUE
then the data is saved to file in
current working directory (CSV format), with filename denoting current
system time and searchTerm
. Default is FALSE
.
language
character string, restricting tweets to the given language,
given by an ISO 639-1 code. For example, "en" restricts to English tweets.
Defaults to NULL.
since
If not NULL, restricts tweets to those since the given date. Date is to be formatted
as YYYY-MM-DD (this is a wrapper to the searchTwitter function in the twitteR package).
until
If not NULL, restricts tweets to those up until the given date. Date is to be formatted
as YYYY-MM-DD (this is a wrapper to the searchTwitter function in the twitteR package).
locale
If not NULL, will set the locale for the search. As of 03/06/11 only ja is effective,
as per the Twitter API (this is a wrapper to the searchTwitter function in the twitteR package).
geocode
If not NULL, returns tweets by users located within a given radius of the given
latitude/longitude. (this is a wrapper to the searchTwitter function in the twitteR package).
sinceID
If not NULL, returns tweets with IDs greater (ie newer) than the specified ID
(this is a wrapper to the searchTwitter function in the twitteR package).
maxID
If not NULL, returns tweets with IDs smaller (ie older) than the specified ID
(this is a wrapper to the searchTwitter function in the twitteR package).
resultType
If not NULL, returns filtered tweets as per value. See details for allowed values.
(this is a wrapper to the searchTwitter function in the twitteR package).
retryOnRateLimit
If non-zero the search command will block retry up to X times if the rate limit
is experienced. This might lead to a much longer run time but the task will
eventually complete if the retry count is high enough (this is a wrapper to the searchTwitter
function in the twitteR package).