R中安装baidumap包时遇到ERROR: lazy loading failed for package 'baidumap'

董哲Dz 2017-08-15 10:38:38

今天安装Remap跟baidumap包,操碎了心。
一、通畅版(无需再看)
library(devtools)
install_github('badbye/baidumap')
install_github('lchiffon/REmap')


二、便秘版
经多次尝试:函数安装+手动下载安装 REmap安装成功(还可重新设置默认浏览器尝试),结果baidumap均失败
installing *source* package 'baidumap' ...
** R
** tests
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'munsell'
ERROR: lazy loading failed for package 'baidumap'
* removing 'D:/R/R-3.4.1-win/R-3.4.1/library/baidumap'
Installation failed: Command failed (1)


苦逼的我左看右看上看下看,左找右找均无果
后来灵机一动
我发现一个问题
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'munsell'
然后我就手动下载munsell包
https://cran.rstudio.com/bin/windows/contrib/3.4/munsell_0.4.3.zip
手动安装
install.packages("C:/Users/Administrator/Desktop/munsell_0.4.3.zip", repos = NULL, type = "win.binary")
package ‘munsell’ successfully unpacked and MD5 sums checked
> library(munsell)
然后重新尝试安装baidumap包
install_github('badbye/baidumap')
结果就成功了!成功了!成功了!

* installing *source* package 'baidumap' ...
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (baidumap)
> library(baidumap)

等等等!
这是什么?
library(baidumap)
baidumap 0.2.2
Apply an application from here: http://lbsyun.baidu.com/apiconsole/key
Then register you key by running `options(baidumap.key = 'xxx')`
啊啊啊啊.............好吧好吧好吧
然后,自己申请一个API就可以了


...全文
3266 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
zycosky 2018-05-01
  • 打赏
  • 举报
回复
楼主 请问如何注册API

2,209

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 其他数据库
社区管理员
  • 其他数据库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧