[Rcpp-devel] Problem with modules
Dirk Eddelbuettel
edd at debian.org
Thu Sep 4 18:58:22 CEST 2014
On 4 September 2014 at 18:28, Stefan Boehringer wrote:
| I try to get the Rcpp.package.skeleton example running.
My favourite approach for cases like this is to look at existing / working
packages. We do have an example in the unit tests set in
inst/unitTests/testRcppModule/
and its ...
| Rcpp.package.skeleton('GeneticsHaplotype', module = T);
|
| My zzz.R looks like:
|
| .onLoad <- function(libname, pkgname){
| #loadRcppModules()
| loadModule("yada", TRUE)
| }
... file inst/unitTests/testRcppModule/R/zzz.R does
.onLoad <- function(libname, pkgname){
loadRcppModules()
}
Can you try this?
If the skeleton does loadModule(...) maybe the skeleton code is behind which
I could fix.
| I also tried various variations (as indicated by the comments in zzz.R).
| I run into
|
| library('devtools');
| library('Rcpp');
| install('GeneticsHaplotype');
| require('GeneticsHaplotype')
| y = Module('yada', mustStart = T);
(Aside: You don't need trailing ';', and you surely do not need devtools.)
There are a number of other packages on CRAN using modules, some with
classes, some with free functions, ... so it is worth looking around.
Dirk
| into
|
| Error in Module("yada", mustStart = T) :
| Failed to initialize module pointer: Error in
| FUN("_rcpp_module_boot_yada"[[1L]], ...): no such symbol
| _rcpp_module_boot_yada in package .GlobalEnv
|
|
| I am running R 3.1.1 (also tried 3.0.1, then 3.0.3), Rcpp_0.11.2
|
| In earlier tries the package name was prepended to the function in the
| error message, but I could never get to that point again.
|
| Thank you very much in advance,
|
| Stefan
|
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel
mailing list