[R] Persistent state of R
Joe Conway
mail at joeconway.com
Tue Nov 25 23:38:08 CET 2003
michael watson (IAH-C) wrote:
> I am trying to make my cgi scripts quicker and it turns out that the
> bottle-neck is the loading of the libraries into R - for example
> loading up marrayPlots into R takes 10-20 seconds, which although not
> long, is long enough for users to imagine it is not working and start
> clicking reload....
>
> So I just wondered if anyone had a neat solution whereby I could
> somehow have the required libraries permanently loaded into R -
> perhaps I need a persistent R process with the libraries in memory
> that I can pipe commands to? Is this possible?
If you are processing data already stored in a database, you could use
Postgres and PL/R. See:
http://www.joeconway.com/
Use Postgres 7.4 and preload PL/R for the best performance -- i.e put
the following line in $PGDATA/postgresql.conf
preload_libraries = '$libdir/plr:plr_init'
HTH,
Joe
More information about the R-help
mailing list