[Rcpp-devel] Rcpp 0.10.0

Romain Francois romain at r-enthusiasts.com
Thu Nov 15 00:23:32 CET 2012


Le 15/11/12 00:14, Richard Downe a écrit :
> Thanks.  I had recently been playing with using XPtr to do some of the
> passing RcppModule objects back into c++, with only limited success, so
> this will be a welcome change.
>
> Also, I can probably finally cull my hackery of calling
> Rcpp::internal::make_new_object in my factory methods, which always made
> me a little uneasy by virtue of being in the internal namespace...

That is the intention: have it scary.

Although, now that you have that knowledge, you can help us perhaps.

> -rd
>
> On 11/14/2012 04:16 PM, Dirk Eddelbuettel wrote:
>> On 14 November 2012 at 13:46, Ian Fellows wrote:
>> |
>> | So,… um… Wow!
>> |
>> | This is some pretty incredible work, and lines up almost to the
>> letter with the real world issues that I was experiencing with my
>> package. Reading over the vignette, a couple of questions popped into
>> my head.
>>
>> Thanks :)  We're very happy that you like it.
>> | With the //Rcpp::interfaces(cpp) declaration
>> | 1. Are classes also exported as transparently as functions.
>> | 2. If my package already has a namespace named ernm, is an extra one
>> wrapped around it, so that extending packages would have to use
>> ernm::ernm::bar()?
>> | 3. Just to be clear… this removes the need to make an inline plug-in
>> because you can just use cppFunction(depends="MyPacakge",…) with no
>> additional glue except for the interface statement.
>>
>> If you would have needed a plugin with inline (for one or more of finding
>> your headers files, set certain flags, determine the linking library and
>> path, ...) then you still do.  The existing plugins for RcppGSL,
>> RcppArmadillo and RcppEigen served as testing templates.  So you may
>> need to
>> write a 'ernm' plugin...
>>
>> Similarly, you may need to supply as<>() and wrap() converters.
>> | I do a lot of passing of objects up and down between R and C++ using
>> home grown code to make the process transparent. Can you speak a
>> little about how the new module object passing is implemented? Are
>> copy constructors called? Is shallow or deep the default? How does one
>> use the new macros?
>>
>>  From 30,000 feet, it "just" sits on top of Rcpp modules which you may
>> have
>> looked at in the past --- and these provide essentially mostly
>> pass-through
>> declarations.
>>
>> JJ will follow-up in a bit with more nitty-gritty.
>>
>> Cheers, Dirk

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30

R Graph Gallery: http://gallery.r-enthusiasts.com
`- http://bit.ly/SweN1Z : SuperStorm Sandy

blog:            http://romainfrancois.blog.free.fr
|- http://bit.ly/RE6sYH : OOP with Rcpp modules
`- http://bit.ly/Thw7IK : Rcpp modules more flexible



More information about the Rcpp-devel mailing list