title: setup_twitter_oauth, searchTwitter and Rscript
body: <p>I run the following script using an installation of RStudio on a Linux-Server.</p>
  
  <pre><code>require(twitteR)
  require(plyr)
  
  setup_twitter_oauth(consumer_key='xxx', consumer_secret='xxx', 
                      access_token='xxx', access_secret='xxx')
  
  searchResults &lt;- searchTwitter("#vds", 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_vds_", Sys.Date(), ".csv", sep = ""))
  </code></pre>
  
  <p>The script works fine,  when I run it from the user-interface.</p>
  
  <p>However, when I automatically run it via the terminal using crontab, I get the following error-message:</p>
  
  <pre><code>[1] "Using direct authentication"
  
  Error in twInterfaceObj$getMaxResults : 
    could not find function "loadMethod"
  Calls: searchTwitter -&gt; doRppAPICall -&gt; $
  Execution halted
  </code></pre>
  
  <p>Why?</p>