title: Searching for new tweets on Twitter using RTweet's search_tweets() function
body: <p>I am switching from using <code>twitteR</code> to <code>Rtweet</code> to automatically search Twitter for new tweets (<code>twitteR</code> seems to truncate the text at 140 characters).The <code>searchTwitter()</code> function in the twitteR package contained a <code>sinceID</code> argument that allowed me to easily search for only the newest tweets and append them to my existing dataset. I cannot find a similar function in the <code>search_tweets()</code> function of the <code>Rtweet</code> package. Is there any way to avoid having to download the entire corpus of tweets and then delete duplicates, and instead only download the newest tweets? </p>
  
  <p>Here is the function and an example of what I currently use:</p>
  
  <pre><code>library(tidyverse)
  library(tidytext)
  library(twitteR)
  
  # FUNCTION ----------
  searchtwitterlastweek_ft &lt;- function(topic, sinceID){
    today &lt;- as.character(Sys.Date())
    lastweek &lt;- as.character(Sys.Date() - 6)
    searchtwitterfortopic &lt;- searchTwitteR(topic, n = 15000, since = lastweek, until = today, sinceID = sinceID)
    if(!length(searchtwitterfortopic) == 0){
      twListToDF(searchtwitterfortopic)
    } else {
      data.frame(list())
    }
  }
  
  # LOAD DATASET FROM PREVIOUS WEEKS ---------
  load("DATA/rstats.Rda")
  
  df_r &lt;- df_r %&gt;%
    arrange(desc(id))
  
  # figure out last ID, i.e. last tweet on subject
  lastid &lt;- first(df_r$id)
  
  df_temporary &lt;- searchtwitterlastweek_ft("#rstats", lastid)
  
  df_r &lt;- rbind(df_r, df_temporary) %&gt;%
    arrange(desc(id))
  </code></pre>