[Rcpp-devel] Loading Rcpp modules from dynamic library

Dirk Eddelbuettel edd at debian.org
Sat Feb 25 21:24:45 CET 2012


Hi Michael,

On 25 February 2012 at 19:45, Michael Braun wrote:
| Hi.  I would like to start using Rcpp modules in my code, but I am having some
| trouble loading them into R.  Here is an example:

My personal approach is to follow the path of least resistance on __start
from an existing package__ having the feature I want to use.

Rcpp comes with modules-using packages as part of the documentation (Rcpp
modules vignette) and unit tests. And there is even a package skeleton
generator (for which you can set an option to use modules). 

And among the now 55 CRAN packages using Rcpp (!!), a few use modules
too. One is my RcppBDT package, there are the two packages by Baptiste (cda,
planar) and probably a few more but one can't tell from the DESCRIPTION.

Your code may have been fine, but you also need to look at the .onLoad or
.onAttach function etc.  So starting from a working stanza really strikes me
as easiest.

Hth, Dirk

-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx


More information about the Rcpp-devel mailing list