我正在尝试一些数据挖掘并尝试从Twitter检索数据。
当我尝试安装套餐' twitteR'时,我收到以下警告:
Warning in install.packages :
download of package ‘rjson’ failed
但它会加载其余的包。然后,当我尝试调用库时:
> library(twitteR)
Loading required package: ROAuth
Loading required package: RCurl
Loading required package: bitops
Attaching package: ‘RCurl’
The following object is masked from ‘package:tm.plugin.webmining’:
getURL
Loading required package: digest
Error: package ‘rjson’ required by ‘twitteR’ could not be found
这是有道理的,如果它无法下载' rjson'包最初。
当我尝试安装' rjson'单独打包,我得到一个熟悉的错误:
> install.packages("rjson")
trying URL 'http://cran.rstudio.com/bin/macosx/contrib/3.0/rjson_0.2.13.tgz'
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/bin/macosx/contrib/3.0/rjson_0.2.13.tgz'
Warning in install.packages :
download of package ‘rjson’ failed
我不熟悉这些错误的疑难解答。很感谢任何形式的帮助。
答案 0 :(得分:5)
如果您不想升级R(我们现在的版本为3.1),您可以从档案中安装。
install.packages("<local path to the downloaded gz file>", repos=NULL, type="source")
希望这会奏效。