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, simulation modeller, and co-developer of the open source SpaDES simulation platform. He completed his PhD at Simon Fraser University modelling host selection in mountain pine beetle (MPB), and postdoctoral research at Université Laval and Natural Resources Canada developing forecasting models of MPB spread.

He currently operates FOR-CAST Research & Analytics in Calgary, Canada, which supports the development and integration of models simulating forest vegetation dynamics, wildfire, insect disturbance, and wildlife populations to inform decision making for land management and species at risk. He is an advocate for open source, open data, and reproducible workflows.