Install rgdal package in MacOSX

(Update 21/5/2021)
brew install gdal

(Updated 28/7/2017 - It works with R-devel 3.5)

First you must install gdal library:
Load GDAL Complete at this link. Use the gdal installers present in that folder.
Then enter in terminal:

sudo echo  'export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH' >> ~/.profile
export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH
cd ~/Downloads/
curl -O http://download.osgeo.org/proj/proj-4.9.3.tar.gz
curl -O https://cran.r-project.org/src/contrib/rgdal_1.2-16.tar.gz

tar -xzvf proj-4.9.3.tar.gz
cd proj-4.9.3
./configure
make && make test
sudo make install

cd ~/Downloads/
sudo R CMD INSTALL –configure-args='-–with-proj-include=/usr/local/lib' rgdal_1.2-16.tar.gz

Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

stepAIC from package MASS with AICc

Install treemix in ubuntu 20.04