oliver
2012-Apr-24 16:31 UTC
[Rd] Using other peoples packages from within C-based R-extension
Hello, what if I want to write a package mixed R/C-extension and want to use code that is provided by other peoples packages? How for example can I use one of the provided wavelet packages from within my C-based R-extension? Somehow I would need to load the other packages and have access to the functions they provide. I mean I don't want to use the other packages via R-level, but directly on the C-layer. Something like shared libs (dlopen and such stuff) but via R-API. Is there a general aproach to this, and how to do it? Ciao, Oliver
Duncan Murdoch
2012-Apr-24 16:39 UTC
[Rd] Using other peoples packages from within C-based R-extension
On 24/04/2012 12:31 PM, oliver wrote:> Hello, > > what if I want to write a package mixed R/C-extension > and want to use code that is provided by other peoples packages? > > How for example can I use one of the provided wavelet packages > from within my C-based R-extension? > > Somehow I would need to load the other packages and have access to the > functions they provide. > I mean I don't want to use the other packages via R-level, but directly > on the C-layer. Something like shared libs (dlopen and such stuff) > but via R-API. > > Is there a general aproach to this, and how to do it?See "Registering native routines" in the Writing R Extensions manual. Duncan Murdoch