[Rd] Is it possible to pass a function argument from R to compiled code in C?

Alireza Mahani alireza.s.mahani at gmail.com
Tue Sep 20 19:26:35 CEST 2011

I have a function in R that takes another function as argument:

f <- function(g, ...) { #g is expected to be a function

I want to see if there is a way to implement "f" in C and calling it from R
using ".C" interface. I know that I can use function pointers for my C
implementation, but I imagine it's going to be nearly impossible to pass a
function from R to C. Are there any exact or approximate solutions

Thank you,
Alireza Mahani

View this message in context: http://r.789695.n4.nabble.com/Is-it-possible-to-pass-a-function-argument-from-R-to-compiled-code-in-C-tp3827563p3827563.html
Sent from the R devel mailing list archive at Nabble.com.

More information about the R-devel mailing list