【发布时间】:2018-01-12 12:30:29
【问题描述】:
我希望安装开发者 okugami79 的 Sentiment140 github 包。我为此编写了以下脚本:
install.packages("githubinstall")
require(devtools)
library(githubinstall)
install_github('sentiment140', 'okugami79')
library(sentiment)
但它抛出了一个错误:
安装失败:连接 raw.githubusercontent.com 端口 443 失败:超时 警告消息:不推荐使用用户名参数。请使用 okugami79/sentiment140
然后我修改安装语句如下:
install_github('okugami79/sentiment140')
还是报错:
安装失败:连接 raw.githubusercontent.com 端口 443 失败:超时
我通过以下链接检查了有关 stackoverflow 的解决方案:
Timeout R package installation from Github
在这里,我找到了一种安装 github 包的方法,方法是下载包 zip 文件并将其安装在 R 中:
install.packages("/address/to/zip-package", repos = NULL, type="source")
这也提示错误:
警告:无效的包'sentiment-master' 错误:错误:未指定包 install.packages 中的警告: 运行命令 '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\u257449\Documents\R\win-library\3.3" "sentiment- master"' 的状态为 1 install.packages 中的警告:软件包“sentiment-master”的安装具有非零退出状态
我应该如何在 R 中从 github 安装所需的包?请求您提供宝贵的建议/解决方案。
谢谢!
【问题讨论】:
标签: r github sentiment-analysis devtools