PL/R is a loadable procedural language that enables you to write PostgreSQL functions and triggers in the R programming language. PL/R offers most (if not all) of the capabilities a function writer has in the R language.
PL/R install notes can be found at: (http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut01)
sahsuland=# create extension plr;
CREATE EXTENSION
sahsuland=# create extension plr;
ERROR: could not open extension control file "C:/Program Files/PostgreSQL/9.1/share/extension/plr.control": No such file or directory
Rename plr–8.3.0.14.sql to plr.sql
sahsuland=# create extension plr;
ERROR: could not stat file "C:/Program Files/PostgreSQL/9.1/share/extension/plr--8.3.0.14.sql": No such file or directory
Rename plr.sql to plr–8.3.0.14.sql
ERROR: could not load library "C:/Program Files/PostgreSQL/9.3/lib/plr.dll": unknown error 126
SQL state: 58P01
Add R_HOME and 32/64 bit R bin directory (as appropriate) to system path