【问题标题】:R - twitteR package download of package ‘rjson’ failedR - 包“rjson”的推特包下载失败
【发布时间】:2014-08-03 08:55:44
【问题描述】:

我正在尝试一些数据挖掘并尝试从 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

我不熟悉如何解决这些错误。很感谢任何形式的帮助。

【问题讨论】:

标签: r twitter data-mining sentiment-analysis


【解决方案1】:

如果您不想升级您的 R(我们现在是 3.1 版),您可以从档案中安装。

  1. http://cran.rstudio.com/src/contrib/Archive/rjson/rjson_0.2.13.tar.gz下载2.13版
  2. 在 R 中,运行 install.packages("<local path to the downloaded gz file>", repos=NULL, type="source")

希望这会奏效。

【讨论】:

  • 是的,一旦我弄清楚了那部分,我就删除了我的评论。非常感谢您的帮助!
猜你喜欢
  • 2014-02-03
  • 1970-01-01
  • 2020-06-29
  • 1970-01-01
  • 2015-09-27
  • 1970-01-01
  • 2011-07-14
  • 1970-01-01
  • 2019-01-04
相关资源
最近更新 更多