Re: [Rcpp-devel] Some questions regarding internals of Rcpp objects

2011-08-05 Thread Ulrich Bodenhofer
Dear Dirk, Thanks for your detailed comments! Regarding the first question: as I wrote, I was actually assuming that Rcpp would not make deep copies. [...] See this variant: R> fun<- cxxfunction(signature(mat="numeric"), plugin="Rcpp", body=' + Rcpp::NumericMatrix matC(mat); + Rcp

Re: [Rcpp-devel] A question in slides from Rcpp workshop

2011-08-05 Thread Zhongyi Yuan
There are in total four slides, and the 2nd is my favorite. I guess one needs to learn more to like the advanced parts. Zhongyi On Fri, Aug 5, 2011 at 5:59 PM, Silkworth,David J. wrote: > ** > > A fair question (although on R itself) and a reference to slides I am glad > I have now seen. > > An

Re: [Rcpp-devel] A question in slides from Rcpp workshop

2011-08-05 Thread Zhongyi Yuan
Hi Dirk, Yes. I can already feel its power. How much one can make out of it really depends on how much s/he is willing to learn. And I am so glad there is a nice list where we can ask questions. Best, Zhongyi On Fri, Aug 5, 2011 at 8:12 PM, Dirk Eddelbuettel wrote: > > Hi Zhongyi, > > On 5 Aug

Re: [Rcpp-devel] A question in slides from Rcpp workshop

2011-08-05 Thread Dirk Eddelbuettel
Hi Zhongyi, On 5 August 2011 at 13:26, Zhongyi Yuan wrote: | That was everything I want to know in this example. | Thanks for helping me out, for your advice, and for such an amazing package. Pleasure -- it was clear that you done some careful reading to find this. Keep plugging along, check als

Re: [Rcpp-devel] A question in slides from Rcpp workshop

2011-08-05 Thread Silkworth,David J.
A fair question (although on R itself) and a reference to slides I am glad I have now seen. An even better reply by Dirk. ___ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp

Re: [Rcpp-devel] Rcpp-devel Digest, Vol 22, Issue 13

2011-08-05 Thread bodenhofer
Thanks for your message! I am out of office until September 5, 2011. Your message will be answered after I return to office on September 6, 2011. Thank you in advance for your kind patience! Best regards, Ulrich Bodenhofer ___ Rcpp-devel mailing l

Re: [Rcpp-devel] A question in slides from Rcpp workshop

2011-08-05 Thread Zhongyi Yuan
Hello Dirk, That was everything I want to know in this example. Thanks for helping me out, for your advice, and for such an amazing package. Best, Zhongyi On Fri, Aug 5, 2011 at 11:21 AM, Dirk Eddelbuettel wrote: > > Zhongyi, > > On 5 August 2011 at 04:05, Zhongyi Yuan wrote: > | Hi Douglas,

Re: [Rcpp-devel] Overloaded constructors?

2011-08-05 Thread Dirk Eddelbuettel
On 5 August 2011 at 12:06, Sebastian Weber wrote: | Hi! | | I recently learned how to deal with overlaoded functions when I wanna wrap | a class function interface with overladed things. The solution is to use | function pointers. Or 'factories' with a base class derived classes, and and and. I

Re: [Rcpp-devel] Some questions regarding internals of Rcpp objects

2011-08-05 Thread Dirk Eddelbuettel
Hi Ulrich, These are really several questions. I'll try to address them all, with some luck maybe Romain, Doug, Christian, ... will correct or complement as needed. On 5 August 2011 at 11:45, Ulrich Bodenhofer wrote: | Dear list members, | | I have started developing a package using the latest

[Rcpp-devel] [ANN] Two more Rcpp master classes this fall

2011-08-05 Thread Dirk Eddelbuettel
[ Last evening, I posted the following with proper hyperlinks at my blog at http://dirk.eddelbuettel.com/blog/2011/08/04#rcpp_classes_2011-09_and_2011-10 ] New Rcpp master classes scheduled for New York and San Francisco Together with Revolution Analytics, I will be offering two more one

Re: [Rcpp-devel] A question in slides from Rcpp workshop

2011-08-05 Thread Dirk Eddelbuettel
Zhongyi, On 5 August 2011 at 04:05, Zhongyi Yuan wrote: | Hi Douglas, | | Thank you for the reply. That clarifies quite a bit. | But still, it does not explain the different behavior of those examples, does | it? One moment ago, I was thinking that the L suffix might have made it | constant and

[Rcpp-devel] Overloaded constructors?

2011-08-05 Thread Sebastian Weber
Hi! I recently learned how to deal with overlaoded functions when I wanna wrap a class function interface with overladed things. The solution is to use function pointers. Now, what comes to the rescue in the case of overladed constructors? Any suggestion? Regards, -- Sebastian Weber Group of

[Rcpp-devel] Some questions regarding internals of Rcpp objects

2011-08-05 Thread Ulrich Bodenhofer
Dear list members, I have started developing a package using the latest version of Rcpp just recently, so I am more or less an Rcpp newbie. Since I am not sufficiently proficient in advanced C++ (and admittedly too lazy too) to analyze the Rcpp source code, I have some questions regarding what

Re: [Rcpp-devel] A question in slides from Rcpp workshop

2011-08-05 Thread Zhongyi Yuan
Hi Douglas, Thank you for the reply. That clarifies quite a bit. But still, it does not explain the different behavior of those examples, does it? One moment ago, I was thinking that the L suffix might have made it constant and hence can't be modified. Looks like I am wrong. (And fun(1:3) gives th

Re: [Rcpp-devel] A question in slides from Rcpp workshop

2011-08-05 Thread Douglas Bates
On Fri, Aug 5, 2011 at 5:27 AM, Zhongyi Yuan wrote: > Dear useR's, > > After I found Rcpp a few days ago, I've been very excited collecting > documents for learning. But still I find myself understand little. > Here's a question I want you to help me with. > > In page 17 of Dirk and Romain's slide

Re: [Rcpp-devel] wrap returned pointer to class

2011-08-05 Thread Sebastian Weber
Hi! I just figured a way to deal with pointers to objects in memory which I receive by calling whatever function of a third-party library. The problem is warp it into a suitable object. My approach which does a nice job is: template <> SEXP wrap( B* const& mb ) { typedef result ptr_wrap