[R] R_FindSymbol

Setzer.Woodrow@epamail.epa.gov Setzer.Woodrow at epamail.epa.gov
Tue Aug 1 18:58:04 CEST 2000

I have written a function that uses LSODA from NETLIB to solve initial value
problems, given a system of ODEs written as an R function.  There are times when
it would be convenient to use the code with an ode system written in a compiled
language.  Certainly, that can be done using .C or .Fortran within an R
function, but that seems inefficient (indeed, it does not enormously speed up
the numerical integration, in my limited testing).  What I would like to do is
to dynamically load a shared library, and pass the name of a symbol as a string
to my ode solver interface.  The C wrapper would then retrieve the pointer to
the function named by the string (or fail gracefully trying), and pass that
pointer to LSODA.  It looks like all I have to do is invoke R_FindSymbol with
the name I am looking for as the first argument, and the null string as the
second; the return value will be the pointer I am looking for.  Am I right, or
is it more complicated than that?

R. Woodrow Setzer, Jr.                                                    Phone:
(919) 541-0128
Biostatistics and
Fax:  (919) 541-4002
Research Support Staff

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