所以我一直在墙上撞了几天,试图理解为什么我的机器不会加载choroplethrZip。我尝试了推荐的安装途径(使用devtools和github),但我一直收到以下错误信息:
#install.packages("devtools")
library(devtools)
install_github('arilamstein/choroplethrZip@v1.5.0')
Downloading GitHub repo arilamstein/choroplethrZip@v1.5.0
from URL https://api.github.com/repos/arilamstein/choroplethrZip/zipball/v1.5.0
Installing choroplethrZip
"C:/PROGRA~1/R/R-35~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/dbrennan/AppData/Local/Temp/Rtmp0q4jjY/devtools29fc168c68f5/arilamstein-choroplethrZip-3cbc9f3" \
--library="C:/Users/dbrennan/Documents/R/win-library/3.5" --install-tests
* installing *source* package 'choroplethrZip' ...
** R
** data
** inst
** tests
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'choroplethr' 2.2.0 is being loaded, but >= 3.3.0 is required
ERROR: lazy loading failed for package 'choroplethrZip'
* removing 'C:/Users/dbrennan/Documents/R/win-library/3.5/choroplethrZip'
In R CMD INSTALL
Installation failed: Command failed (1)
我已尝试重新启动r并立即运行代码,以及重新启动计算机本身。我也尝试将包zip文件直接读入R,但这也没有用。任何帮助将不胜感激。
答案 0 :(得分:0)
隐藏在错误消息中的是:
namespace 'choroplethr' 2.2.0 is being loaded, but >= 3.3.0 is required
事实上,如果你看一下choroplethrZip的DESCRIPTION页面,你会看到它导入&#34; choroplethr(&gt; = 3.3.0)&#34;。
由于您只安装了2.2.0版,我建议输入:
update.packages()
将更新您的所有包裹。然后再尝试安装并加载choroplethrZip。