Skip to content

Instantly share code, notes, and snippets.

View jebyrnes's full-sized avatar

Jarrett Byrnes jebyrnes

View GitHub Profile
@jebyrnes
jebyrnes / iworkfortheinternet.R
Created December 14, 2011 01:26 — forked from sckott/iworkfortheinternet.R
Code for searching Twitter using the twitteR #rstats package.
require(plyr); require(stringr); require(ggplot2); require(lubridate); require(twitteR)
##need to figure out why there are two datout objects and not just 1...
twitterPlot<-function(myString, n=1500, since=NULL, until=NULL){
since2<-as.character(strptime(since, '%Y-%m-%d')+2*24*60*60)
until2<-as.character(strptime(until, '%Y-%m-%d')+2*24*60*60)
datout_1 <- searchTwitter(myString, n = n, since=since, until=until)
datout_2 <- searchTwitter(myString, n = n, since=since2, until=until2)