从GitHub安装RSelenium

问题描述 投票:0回答:1

我想将RSelenium用于R,但已从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版本已更新,这通常会使软件包对我不起作用。问题修复程序no1“重启R Studio”也无济于事;)))

r rselenium
1个回答
1
投票

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

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

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

install.packages(c("XML", "wdman", "binman", "subprocess", "semver", "RSelenium"), 
                 repos = "https://cloud.r-project.org")
© www.soinside.com 2019 - 2024. All rights reserved.