Skip to content
Prev 8728 / 398502 Next

R as a daemon?

On 3 Jan 2001, MJ Ray wrote:

            
See http://developer.r-project.org/embedded.html

NEWS says

    o   Preliminary support for building R as a shared library (`libR')
        under Unix.  Use configure with option `--enable-R-shlib' or do
        `make libR' in directory `src/main' to create the shared
        library.
        
        There is also a linker front-end `R CMD LINK' which is useful
        for creating executable programs linked against the R shared
        library.

and that's about all there is.

The idea is that you can make a shared library version of R. libR.so, and
link your application against it.  There are even some examples, but I
don't know of a link to those.
How can cgi identify the client?  You may have fail-safe ways of doing so,
but there is nothing to stop me having two applets in one browser each
talking to the cgi-server, so they will not be straightforward ones.
Perhaps I am thinking much more generally than you intend to implement.
I thought about CORBA, or Perl. (I believe you can go both ways, but if
you tell Duncan what is missing information he is happy to provide it, in
my experience.)  But I would try embedding R first, and you may need to
ask Duncan Temple Lang for his test examples.