[R] library

Thomas Lumley thomas at biostat.washington.edu
Thu Apr 8 20:34:26 CEST 1999


On Thu, 8 Apr 1999, Nicholas Lee wrote:
> You might want to try:
> http://www.mathsoft.co.uk/splus/download/cfortran.pdf
> 
> There is an example in there which is reasonibly clear. 


> 
> The c/fortran bit of glm code in Splus, uses some special magic stuff with
> frames and memcpys.  I've got some example code of that here is that might
> be a better type of solution.  Although I have try this stuff in R, and it
> might not work.

As the internals of R and S are different the frame/memcpy stuff can be
guaranteed not to work. It shouldn't even compile. 

Equivalent kinds of things are possible in theory, but require an
understanding of the undocumented internals of R, and in particular the
black art of pointer protection, to stop the garbage collector tromping
all over your data. In contrast to call_S you would be working with `live'
objects on the R heap rather than fixed-address copies. There are
currently at least two attempts in progress to do this (for nlme and
survival5).


Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list