0

我正在使用 twitteR 包(以及所有需要的包),它们都是最新版本来进行“Lynas Malaysia”推特情绪分析。

源代码如下:

library(twitteR)
library(plotrix)

dontshowtweet <- 0
showtweetyesterday <- searchTwitter("lynas", n=1000, 
                                    date=as.character(Sys.Date()-7))
sources <- sapply(showtweetyesterday, function(x) x$getScreenName())
sources <- gsub("</a>", "", sources)
sources <- strsplit(sources, ">")
sources <- sapply(sources, function(x) ifelse(length(x) > 1, x[2], x[1]))

pie(table(sources),
    main = "Who is tweeting about me")
length(showtweetyesterday)

df <- twListToDF(showtweetyesterday)
df[1:1000,c(10,4)] #screen name & created date
length(showtweetyesterday)

我仍然面临由 RCurl 引起的错误。通过使用警告(),我得到:

In mapCurlOptNames(names(.els), asNames = TRUE) :
Unrecognized CURL options: date

如何解决这个错误?

谢谢。

4

1 回答 1

1

根据手册,该searchTwitter函数没有date参数:您可能想要since

于 2012-02-25T05:50:20.030 回答