这里的问题并不完全是如何通过R绘制地图,因为我已经发现这里有一个非常好的例子,而是如何让它工作.实际上,我无法加载库rgdal
:
library(rgdal)
Error in library(rgdal) : there is no package called ‘rgdal’
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试手动安装上面的包时,我收到以下错误:
....
configure: error: proj_api.h not found in standard or given locations.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/eualin/R/i686-pc-linux-gnu-library/2.15/rgdal’
Warning in install.packages : installation of package ‘/home/eualin/Downloads/rgdal_0.8-5.tar.gz’ had non-zero exit status
Run Code Online (Sandbox Code Playgroud)
欢迎任何投入!
你能建议我自动在R中加载包裹的方法吗?我的意思是,我想在R中开始一个会话,而不需要library('package name')
多次使用.假设我下次启动R时下载了我想要使用的所有软件包.