[Rcpp-devel] Resolving NativeSymbolInfos from Rcpp
Davor Cubranic
cubranic at stat.ubc.ca
Wed Jun 9 03:04:59 CEST 2010
Hi there,
I have a question about the murky world of R internals, DLLs, and their interaction with Rcpp.
There are some C routines in the 'stats' package that I would like to call directly from my Rcpp-based package, e.g., loess_raw. However, 'stats' only exposes them to R callers, not C or C++. (I.e., it does not use R_RegisterCCallable, but they are among R_CMethodDef's passed in R_registerRoutines.)
Reading the information on writing R extensions, it sounds like there may not be a way to get to the address of an object in another package's DLL. (In this case, in stats.so.) However, there is a NativeSymbolInfo for stats:::R_loess_raw, which includes all sorts of info about the C method. Is there a way that this can be used to get a function pointer to it from within my code? And if this is too unportable, is there a cleaner way?
Thanks,
Davor
More information about the Rcpp-devel
mailing list