Learn R Programming

twitteR (version 0.9.2)

searchTwitter: Search twitter

Description

This function will issue a search of Twitter based on a supplied search string.

Usage

searchTwitter(searchString, n=25, session = getCurlHandle(), lang=NULL, since=NULL, ...)
Rtweets(n=25, session = getCurlHandle(), lang=NULL, since=NULL, ...)

Arguments

searchString
Search query to issue to twitter
n
The number of tweets to return
session
A session object from initSession
lang
If not NULL, restricts tweets to the given language, given by an ISO 639-1 code
since
If not NULL, restricts tweets to those since the given date. Date is to be formatted as YYYY-MM-DD
...
Optional arguments to be passed to getURL

Details

These commands will return any non-protected tweets which match the search criteria. Note that there are pagination restrictions as well as other limits on what can be searched, so it is always possible to not retrieve as many tweets as was requested with the n argument.

The Rtweets function is a wrapper around searchTwitter which hardcodes in a search for #rstats}. A premade session will almost never be necessary. A list of status objects [object Object] status searchTwitter("#beer", n=100) Rtweets(n=37) interface