[Rd] Using other peoples packages from within C-based R-extension

Dirk Eddelbuettel edd at debian.org
Tue Apr 24 19:02:33 CEST 2012


On 24 April 2012 at 12:39, Duncan Murdoch wrote:
| 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.

And there are over 120 packages providing access:

   CITAN Cubist GOSim KernSmooth MASS MSBVAR Matrix NetComp PMA PopGenome
   QuACN RCurl RODBC RTextTools Rcpp Rigroup Rlabkey Rmosek Rmpfr Rook Rserve
   Runuran SASxport SMCP SoDA TraMineR XML actuar adaptivetau akima aster
   aster2 bcv bda blme boolfun bstats canvas caret catnet cgh chron class
   climdex.pcic clpAPI clue cluster copula cplexAPI cplm datamap devEMF
   edesign expm fastICA fastcluster ff flsa foreign fracdiff fuzzyRankTests
   gb glpkAPI gmp gputools grpreg gsmoothr heavy hypred ifs ifultools int64
   interactivity kza lattice lfe lme4 locfit lpSolveAPI markdown mgcv minqa
   mugnet ncvreg nlme nnet pedigreemm phangorn phmm potts ppstat qtbase
   qtpaint quadprog rPorta randtoolbox rcdd rdyncall rgeos rggobi rmongodb
   rngWELL robustbase rpart rphast rrp rtfbs sde sensitivityPStrat sp spatial
   spdep spsurvey spt tree tripack uncompress vines xlsReadWrite xts yaml zoo

Matrix and lme4 is the prototypical example by R Core, MASS also provides
something.  I'd probably start with zoo and xts ...

Dirk

PS Rcpp et al don't do it as you can't register C++ routines IIRC.

-- 
R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
See agenda, registration details and more at http://www.RinFinance.com



More information about the R-devel mailing list