title: twitter API rate limit
body: <p>I want to collect data from twitter over a period of several weeks.</p>
  
  <p>To do so, I use RStudio Server and crontab to automatically run several scripts like the following:</p>
  
  <pre><code>require(ROAuth)
  require(twitteR)
  require(plyr)
  
  load("twitter_authentication.Rdata")
  registerTwitterOAuth(cred)
  
  searchResults &lt;- searchTwitter("#hashtag", n=15000, since = as.character(Sys.Date()-1), until = as.character(Sys.Date()))
  head(searchResults)
  
  tweetsDf = ldply(searchResults, function(t) t$toDataFrame())
  write.csv(tweetsDf, file = paste("tweets_test_", Sys.Date() - 1, ".csv", sep = ""))
  </code></pre>
  
  <p>On some days, I will only have a few tweets (up to 100) per hashtag and so the script runs smoothly. However, on other days there will be thousands of tweets for a certain hashtag (of course I am not using the term "hashtag" but the term I need for my study).</p>
  
  <p>I can add <code>retryOnRateLimit=10</code> to <code>serchTwitter</code>. But when I search for multiple hashtags every day, how should I time these queries in crontab? </p>
  
  <p>In order to organize these queries, I need to know how many tweets I am able to collect by running the script once within the 15 minute time interval! Does anybody know the answer? (of course, according to the Twitter API rate limits, I can do </p>
  
  <blockquote>
    <p>180 queries per 15 minute window</p>
  </blockquote>
  
  <p>but how many tweets is this?)</p>