In terminal:
cd ~
curl "http://www.joeconway.com/plr/plr-8.3.0.15.tar.gz" -o "plr-8.3.0.15.tar.gz"
tar xzf plr-8.3.0.15.tar.gz
cd plr
R_HOME="/Library/Frameworks/R.framework/Resources/" USE_PGXS=1 PG_CONFIG="/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config" make
R_HOME="/Library/Frameworks/R.framework/Resources/" USE_PGXS=1 PG_CONFIG="/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config" make install
'/Applications/Postgres.app/Contents/Versions/9.3/bin'/psql -p5432 test
In PostgreSQL (http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut01):
CREATE EXTENSION plr;
In R:
install.packages("dplyr")
install.packages("RPostgreSQL")
Installing RPostgreSQL might cause some issues, if so, install gcc from here: https://github.com/kennethreitz/osx-gcc-installer