学习R绘制地图的过程中需要安装REmap包,原本的安装方法是:
library('devtools')
install_github('lchiffon/REmap')
但是却出现了如下错误
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_COLLATE failed, using "C"
3: Setting LC_TIME failed, using "C"
4: Setting LC_MESSAGES failed, using "C"
5: Setting LC_PAPER failed, using "C"
网上搜了很久,试了好几个办法,终于用这个方法成功安装了REmap包:
1、打开终端
2、在终端内输入:defaults write org.R-project.R force.LANG en_US.UTF-8
3、关掉终端
4、重启R
重新在R里输入
install_github('lchiffon/REmap')
显示:
Downloading GitHub repo lchiffon/REmap@master
✔ checking for file ‘/private/var/folders/_b/6579fvr177g_y8h__cg6z8zr0000gn/T/RtmpLL8ZXW/remotes147f81db7f7bf/Lchiffon-REmap-7eabe6f/DESCRIPTION’ ...
─ preparing ‘REmap’:
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘REmap_0.3.2.tar.gz’
* installing *source* package ‘REmap’ ...
** R
** data
*** moving datasets to lazyload DB
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (REmap)
安装成功!