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

2012-04-24 Thread oliver
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

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


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

2012-04-24 Thread Duncan Murdoch

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

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


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

2012-04-24 Thread Dirk Eddelbuettel

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

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


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

2012-04-24 Thread Jeffrey Ryan
This link may be of help as well...

https://stat.ethz.ch/pipermail/r-devel/2008-November/051262.html


HTH
Jeff

On 4/24/12 12:35 PM, oliver oli...@first.in-berlin.de wrote:

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

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel