[Rd] Embedding R and registering routines

From: Jeffrey Horner <jeff.horner_at_vanderbilt.edu>
Date: Tue, 01 May 2007 10:20:41 -0500


Hello,

The use of .Call and the like all depend on loading shared libraries and registering routines from it. Also, .Primitive and .Internal depend on routines being registered in the R binary. And applications that embed R can override routines declared in Rinterfac.h, but is there a way for an application embedding R to register other routines defined in the application without loading a shared library or re-compiling R?

The only such way I've found that comes close to a solution to this is creating an RObjectTable and attaching that to the search path. Assignments to variables in that environment can call the table's get routine which is defined in the application, and I think that might be an interesting solution for a new RApache implementation.

For the RApache Project, the mod_R.c shared library get's loaded into the apache process and its purpose is to initializes R. Next, it calls 'library(RApache)' to load RApache.so, a package that implements the RApache API. This two-library system works, but the implementation is too complex. I'd like to simplify down to just one shared library.

Any comments, suggestion are much appreciated.

Thanks,

Jeff

-- 
http://biostat.mc.vanderbilt.edu/JeffreyHorner

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue 01 May 2007 - 22:27:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 01 May 2007 - 22:32:50 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.