Re: [Rcpp-devel] Modules docs

2010-12-08 Thread Dominick Samperi
On Wed, Dec 8, 2010 at 6:15 PM, Romain Francois wrote: > I'm not sure which version of the vignette you are referring to, but the > one on CRAN (related to Rcpp 0.8.9) recommends to have this in the > NAMESPACE: > > import(Rcpp) > > This might be conservative and you might end up importing too muc

Re: [Rcpp-devel] Modules docs

2010-12-08 Thread Romain Francois
I'm not sure which version of the vignette you are referring to, but the one on CRAN (related to Rcpp 0.8.9) recommends to have this in the NAMESPACE: import(Rcpp) This might be conservative and you might end up importing too much. I don't see much of a downside to it. Le 08/12/10 21:21, Do

Re: [Rcpp-devel] Modules docs

2010-12-08 Thread Dominick Samperi
To be more concrete, I define a module in foo.cpp and do something like this: foo = Module("MyClass", PACKAGE="MyPack") foo$myfunc() Where myfunc() is defined using function() in the RCPP_MODULE macro. I can also extract the underlying reference and work with that as well. This works without the

[Rcpp-devel] Modules docs

2010-12-08 Thread Dominick Samperi
I have a question about the modules vignette. At the end it says client packages must importClassesFrom(...), and there are comments about using .onLoad() as well. But before reading this I already implemented the use of modules in another (client) package without using these constructions. They