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

oliver oliver at first.in-berlin.de
Tue Apr 24 19:35:32 CEST 2012


Hello, 

OK, thanks for the information...


On Tue, Apr 24, 2012 at 12:02:33PM -0500, Dirk Eddelbuettel wrote:
> 
> 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
[...]

But no wavelets stuff... (?)
(It was more than an example, I'm look for wavelet decompositioning.)


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

You mean with "start with" that I could look how to allow exporting
for my own package?

At the moment I'm rather looking for how to import symbols and access fnuctionality
of othera people's packages ...


Ciao,
   Oliver



More information about the R-devel mailing list