Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
r-searchTwitter因为不起作用_R_Date_Twitter - Fatal编程技术网

r-searchTwitter因为不起作用

r-searchTwitter因为不起作用,r,date,twitter,R,Date,Twitter,我以前从未遇到过这个问题,searchTwitter(twitteR)因为不工作,我的代码是: library("twitteR") api_key <- "xxxx" api_secret <- "xxxxx" access_token <- "xxxx" access_token_secret <- "xxxx" options(httr_oauth_cache=TRUE) setup_twitter_oauth(api_key,api_secret,access_

我以前从未遇到过这个问题,searchTwitter(twitteR)因为不工作,我的代码是:

library("twitteR")

api_key <- "xxxx"
api_secret <- "xxxxx"
access_token <- "xxxx"
access_token_secret <- "xxxx"
options(httr_oauth_cache=TRUE)
setup_twitter_oauth(api_key,api_secret,access_token,access_token_secret)

s <- searchTwitter("#SiYoFueraPresidente", since = "2015-11-15", n = 50)
sdf <- do.call("rbind", lapply(s, as.data.frame))

max(sdf$created)
"2015-11-17 20:15:50 UTC"

min(sdf$created)
"2015-11-17 20:15:43 UTC"
library(“twitteR”)

api_key您可以将日期值嵌入查询本身;为我工作:

s <- searchTwitter("#SiYoFueraPresidente since:2015-11-15", n = 50)
s