Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.HPP.3.96.990408120037.21433E-100000@tiger.statslab.cam.ac.uk>
Date: 1999-04-08T11:16:52Z
From: Nicholas Lee
Subject: library
In-Reply-To: <Pine.GSO.4.05.9904072014090.29009-100000@auk.stats>

On Wed, 7 Apr 1999, Prof Brian D Ripley wrote:

> On Wed, 7 Apr 1999, Guido Masarotto wrote:
> 
> > On Wed, Apr 07, 1999 at 05:16:31PM +0100, Prof Brian D Ripley wrote:
> > > On Wed, 7 Apr 1999, Heberto Ghezzo wrote:
> > > 
> > > Sounds to me as if you need to use call_R and pass the function (not its
> > > name) as an argument to .C("Setup_system", ....
> > > 
> > > Now, there are not many examples of call_R/call_S about.  Read the
> > > appropriate section in the Blue Book rather carefully.
> > 
> > 
> >   Not many, but one small which shows exactly this sort of things
> >   is the R dynload demo. Look to demos/dynload/zero.[cR]
> 
> That _is_ the example from the Blue book: you will need to read the book
> (very, very carefully in my experience) to understand the incantations in
> the C source.

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.

Nicholas



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._