r语言 - Installing RSelenium from GitHub



我想对R使用RSelenium,但它已从CRAN中删除。我决定使用GitHub下载/安装来遵循指南,但我收到了一条无法解释的错误消息。

devtools::install_github("ropensci/RSelenium")

R开始下载

Downloading GitHub repo ropensci/RSelenium@master
These packages have more recent versions available.
Which would you like to update?
1: All                             
2: CRAN packages only              
3: None                            
4: XML (3.98-1.20 -> 3.99-0) [CRAN]
Enter one or more numbers, or an empty line to skip updates:

我正在输入1,因为我希望所有内容都更新。

XML        (3.98-1.20 -> 3.99-0) [CRAN]
wdman      (NA        -> 0.2.4 ) [CRAN]
binman     (NA        -> 0.1.1 ) [CRAN]
subprocess (NA        -> 0.8.3 ) [CRAN]
semver     (NA        -> 0.2.0 ) [CRAN]
Installing 5 packages: XML, wdman, binman, subprocess, semver
Error: Failed to install 'RSelenium' from GitHub:
(converted from warning) unable to access index for repository http://www.omegahat.net/R/bin/macosx/el-capitan/contrib/3.6:
cannot open URL 'http://www.omegahat.net/R/bin/macosx/el-capitan/contrib/3.6/PACKAGES'

我该如何解决该问题?(我的R和RStudio版本更新了,这通常会使包对我不起作用。问题修复程序1"重新启动R Studio"也没有帮助;(。

您的问题是某些依赖项在默认的repo上不可用。具体来说,这不起作用:

install.packages("binman", repos = "http://www.omegahat.net/R")

CCD_ 2当前在CCD_ 3上也是可用的。因此,您所要做的就是选择一个包含这些包的CRAN镜像。例如:

install.packages(c("XML", "wdman", "binman", "subprocess", "semver", "RSelenium"), 
repos = "https://cloud.r-project.org")

最新更新