Skip to content
Prev 2088 / 10988 Next

[Rcpp-devel] Rcpp Modules - Failed to initialize module pointer

OK, I think I got it. After restarting with a clean workspace, the 
message changed to
 > yada
Uninitialized module named "yada" from package "testmod",

which is probably due to some kind of lazy loading. I can then directly call
 > yada$foo(2,3)
[1] 6
 > yada
Rcpp module 'yada'
         6 functions:
             bar : 1 arguments
             bla : 0 arguments
            bla1 : 1 arguments
            bla2 : 2 arguments
             foo : 2 arguments
           hello : 0 arguments
         1 classes :
           World

My mistake was to use the line
 > yada <- Module( "yada" )
After this line, the command
 > yada$foo(2,3)
leads to the "Failed to initialize module pointer" error.

Is there a way to load/initialize the module in such a way that
 > library(testmod)
 > yada
immediately yields the full description above?


Best regards,
Peter



Am 09.04.2011 14:11, schrieb schattenpflanze at arcor.de: