Installing rgdal on OSX

Aug 5, 2014 · 1 min read
posts

This is actually really easy to do, but most of the google hits I came across were old (from 2010) or horribly complex (building gdal and proj4 from source then building rgdal itself).

First, this assumes you already have homebrew installed 1. If not, see http://brew.sh/ for the one-liner terminal install.

Next, install gdal:

brew install gdal

Then open RStudio (for some reason it didn’t work using R in the terminal…) and install the package from source:

install.packages("rgdal", type="source")

That’s it. Seriously easy.

Update: fixed typos in brew commands


  1. If you use macports the process is similarly simple. See here. ↩︎

Alex M Chubaty
Authors
Ecologist and simulation modeller

Dr. Chubaty is an ecologist and simulation modeller who builds spatial models of forest landscapes and the species that live in them. He completed his PhD at Simon Fraser University modelling host selection in mountain pine beetle (MPB), followed by postdoctoral research at Université Laval and Natural Resources Canada developing forecasting models of MPB spread.

He runs FOR-CAST Research & Analytics in Calgary, Canada. His recent work includes LANDIS-II forest landscape simulation studies, landscape connectivity modelling, and analyses of insect outbreak dynamics, to inform land management and species-at-risk decisions. He writes open-source R packages for this work, including grainscape for connectivity analysis, landisutils for LANDIS-II simulations, and co-developed the SpaDES simulation platform. He advocates for open data and reproducible workflows.