【发布时间】:2021-02-14 01:08:58
【问题描述】:
我的理解是,“H3地理空间索引系统”是Uber开发的一种“坐标系统”,其主要特点是它基于一个层次六边形的系统。 “he”是 R 中的一个库,可以帮助人们处理“H3 空间参考系统”中的数据,但它不存储在 CRAN 中,而是存储在 GitHub (https://github.com/crazycapivara/h3-r) 中。
但是,我无法在 R 中安装此库。我已将其放入托盘中(按照 GitHub 中的说明):
install.packages("devtools")
devtools::install_github("crazycapivara/h3-r")
但它不起作用,并且正在返回此消息:
devtools::install_github("crazycapivara/h3-r")
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘digest’
然后,我执行了相同的步骤,但在“R-cloud”中得到了不同的错误:
h3_hex-ring.cpp:2:22: fatal error: h3/h3api.h: No such file or directory
compilation terminated.
/opt/R/4.0.3/lib/R/etc/Makeconf:181: recipe for target 'h3_hex-ring.o' failed
make: *** [h3_hex-ring.o] Error 1
ERROR: compilation failed for package ‘h3’
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/4.0/h3’
Error: Failed to install 'h3' from GitHub:
(converted from warning) installation of package ‘/tmp/RtmpzwLngc/file1698ded56/h3_3.3.2.tar.gz’ had non-zero exit status
我查看了那个 GitHub,但我无法找出问题所在。有没有人在 R 上成功安装了这个库或者知道不同的库可以在这种空间参考系统上工作?
【问题讨论】:
-
您是否按照 github 自述文件页面上“要求”下列出的步骤进行操作?如果是这样,这些命令的输出是什么?要解决有关“摘要”不可用的错误消息,请先尝试自己运行
install.packages("digest")。