[Rcpp-devel] Preferred way to create an instance of a C++ class exported in a module?

2010-11-30 Thread Douglas Bates
I have seen a couple of ways of creating an instance of a C++ class exported in a module mod <- Module("myMod", "myPackage") cls <- mod$myClass inst <- cls$new(constructorArgs) and inst <- new(mod$myClass, constructorArgs) Is one of these the preferred way? _

Re: [Rcpp-devel] Preferred way to create an instance of a C++ class exported in a module?

2010-11-30 Thread romain
I'd say up to you. I prefer the new( Class , ... ) construct. Also, with Rcpp 0.8.9 with populate, you dont need to use the $ so much. You can, in your .onLoad call populate once and then just use the class. See the Rcpp-modules vignette. Romain Le 30 nov. 2010 à 05:21 PM, Douglas Bates

Re: [Rcpp-devel] Preferred way to create an instance of a C++ class exported in a module?

2010-11-30 Thread Douglas Bates
On Tue, Nov 30, 2010 at 10:31 AM, wrote: > I'd say up to you. I prefer the new( Class ,  ... ) construct. > > Also, with Rcpp 0.8.9 with populate, you dont need to use the $ so much. > > You can, in your .onLoad call populate once and then just use the class. See > the Rcpp-modules vignette. Is

Re: [Rcpp-devel] Preferred way to create an instance of a C++ class exported in a module?

2010-11-30 Thread romain
Le 30 nov. 2010 à 06:01 PM, Douglas Bates a écrit : > On Tue, Nov 30, 2010 at 10:31 AM, wrote: >> I'd say up to you. I prefer the new( Class , ... ) construct. >> >> Also, with Rcpp 0.8.9 with populate, you dont need to use the $ so much. >> >> You can, in your .onLoad call populate once

[Rcpp-devel] Rcpp compiler support and tests for suitable compilers

2010-11-30 Thread Dirk Eddelbuettel
The Rcpp (and RInside) documentation attempts to make it clear that the set of supported compilers is definied by R Core via the support in R and its tools. Rcpp is first and foremost an extension package for R, it does not live by itself out there in the wild. So useful compilers are the ones