PL/R

PL/R is a procedural language for PostgreSQL using R as the engine. It lets you write database functions in R and call them from SQL — handy for statistical analysis without leaving the database.