
今天安裝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就可以了
uj5u.com熱心網友回復:
樓主 請問如何注冊API轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/90970.html
標籤:其他數據庫
上一篇:mathematica傅里葉變換
