[R] how to load a c function in R

Francisco J Molina FJMolina at lbl.gov
Sat Mar 23 03:23:23 CET 2002


It seems that to use .C() I need to load that C function first.

Does anyone know how to do it?

Is it supposed that the C function has to return the initial arguments
(the input) but modified?

I want to use a function in C that requires other 2 functions in C to
create a workspace (space in memory) and then erase it?

Should I use two .C() several times consecutively (once for every
function)?

The functions are from the gsl library:

========================================================================================
Function: gsl_integration_workspace * gsl_integration_workspace_alloc
(size_t n) 
    This function allocates a workspace sufficient to hold n double
precision intervals, their integration results
    and error estimates. 

Function: void gsl_integration_workspace_free (gsl_integration_workspace
* w) 
    This function frees the memory associated with the workspace w. 

Function: int gsl_integration_qag (const gsl_function *f, double a,
double b, double epsabs, double epsrel, size_t
limit, int key, gsl_integration_workspace * workspace, double * result,
double * abserr)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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