rnaturalearthhires 包安装错误

kos*_*osk 9 r

我正在尝试安装该rnaturalearthhires软件包,但遇到很多错误。

\n

这是第一个错误:

\n
Installing the rnaturalearthhires package.\nInstalling package into \xe2\x80\x98C:/Users/kkost/OneDrive/Dokumenti/R/win-library/4.0\xe2\x80\x99\n(as \xe2\x80\x98lib\xe2\x80\x99 is unspecified)\n
Run Code Online (Sandbox Code Playgroud)\n
\n

值 [3L] 中存在错误:\n无法安装 rnaturalearthhires 软件包。\n请尝试使用以下命令自行安装该软件包:\ninstall.packages("rnaturalearthhires", repos = http://packages.ropensci.org", type = "source")

\n
\n

然后我尝试以下代码:

\n
install.packages("rnaturalearthhires", repos = "http://packages.ropensci.org", type = "source")\n
Run Code Online (Sandbox Code Playgroud)\n

我明白了:

\n
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:\nhttps://cran.rstudio.com/bin/windows/Rtools/\nInstalling package into \xe2\x80\x98C:/Users/kkost/OneDrive/Dokumenti/R/win-library/4.0\xe2\x80\x99\n(as \xe2\x80\x98lib\xe2\x80\x99 is unspecified)\n**Error in install.packages : error reading from connection**\n
Run Code Online (Sandbox Code Playgroud)\n

然后我尝试这段代码:

\n
devtools::install_github("ropensci/rnaturalearthhires")\n
Run Code Online (Sandbox Code Playgroud)\n

但最终得到这个:

\n
\n

loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) 中出现错误:\nnamespace \xe2\x80\x98rlang\xe2\x80\x99 0.4.8 已加载,但是需要 >= 0.4.10

\n
\n

我也尝试这个代码:

\n
install_github("ropensci/rnaturalearthhires")\n
Run Code Online (Sandbox Code Playgroud)\n

但我明白了:

\n
\n

install_github("ropensci/rnaturalearthhires") 中的错误:\n找不到函数“install_github”

\n
\n

小智 8

我发现这个问题,它可能会有所帮助: https ://github.com/ropensci/rnaturalearthhires/issues/2

install.packages("devtools") # I guess you also need this
devtools::install_github("ropensci/rnaturalearthhires")
library("rnaturalearth")
Run Code Online (Sandbox Code Playgroud)


Sha*_*awn 6

对于某些用户来说,devtools 可能需要很长时间来编译和安装。现在可以使用远程包直接从 github 进行安装。

remotes::install_github("ropensci/rnaturalearthhires")