[R-sig-finance] R vs. S-PLUS vs. SAS
mail at joeconway.com
Sat Dec 4 21:39:04 CET 2004
Andrew Piskorski wrote:
> Someone might want to ask Joe Conway about his experience and thoughts
> integrating R as a procedural language inside PostgreSQL, to create
> (Hm, for good measure, I have Cc'd him on this email.) Obviously, an
> RDBMS like PostgreSQL is expert at dealing with data that doesn't fit
> into RAM. I've no idea whether PL/R does anything special to take
> advantage of that, or how feasible it would be to do so.
There is nothing particularly special in PL/R per se, but there are some
advantages of the RDBMS-embedded R-interpreter approach of PL/R.
Although not written about PL/R, much of Duncan Temple Lang's whitepaper
related to usage scenarios for his REmbeddedPostgres package applies. It
can be found here:
Additionally, since PL/R supports direct in-process SQL queries from R,
large data sets can be processed in groups of records (e.g. by using
"DECLARE ... CURSOR FOR SELECT ..." and "FETCH 1000 FROM ..." in a loop)
as long as the analysis being performed can support it.
I got the impression somewhere that the DBI packages support a kind of
virtual data.frame interface to supported databases -- i.e. the rows are
retrieved in groups as they are accessed, in some sort of FIFO manner.
Is that true? Perhaps at some point that notion could be added to PL/R
as well (no promises on timing, howver -- my day-job is keeping me
pretty busy these days).
More information about the R-sig-finance