Is there a way to load/initialize the module in such a way that
> library(testmod)
> yada
immediately yields the full description above?
Aha, it seems that setting the (yet undocumented) option 'mustStart' to
'TRUE' in the Module command inside .onLoad() does the trick :-).
Best regards,
Pete
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:
Hello,
I would like to use the very nice Rcpp (0.9.3) Module feature to expose
C++ functions to R. As a starting point, I tried to get the "testmod"
package, created with
Rcpp.package.skeleton( "testmod", module = TRUE )
to run. I can compile and install the package without errors on R
2.14.