Some time back (too long, alas) I presented a method for running R functions within the database engine (sql). Alas, this was done with Postgres and the PL/R extension. I could find none for SQL Server.
Since Joe Conway's PL/R is relatively little code, and attaches to the Postgres engine through its embedded C/C++ user defined function extension (while at the sql function level it's identified as R language, it's really just C to Postgres).
At the time, and ever since, I've been puzzled why other engines don't provide similar?? Joe's created PL/R pretty much in his spare time. Not to denigrate the effort, by any means, only to point out that a full-blown development team isn't needed to provide such a hook to a database engine. Where are the others?
Recently, Oracle has done so. It's kind of buried, at least to those of us not Oracle hounds. Here's a link: https://blogs.oracle.com/R/entry/analyzing_big_data_using_the1
You'll need to visit, since they've disabled copy/paste. Proprietary software!!
Come on Steve, get with it!! (The Steve in Redmond, just to be clear).