[R] Sending a function as an argument to C code.

Ian Fiske ianfiske at gmail.com
Sat Jun 13 05:01:24 CEST 2009



Christophe Genolini wrote:
> 
> 
> In order to optimize the code, I would like to write myFunc in C. Is it 
> possible, in the C code, to call a function define in R (dist1 or dist2) 
> that will be send to myFunc as an argument ?
> 
> Christophe
> 
> 

You want to read section 5.11: "Evaluating R expressions from C" in the
Writing R Extensions manual.  Especially look at the lapply2 example.

Ian
-- 
View this message in context: http://www.nabble.com/Sending-a-function-as-an-argument-to-C-code.-tp23994631p24008711.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list