Re: [Rcpp-devel] inline with classes

2010-11-04 Thread Whit Armstrong
Very cool that you guys used my example in your Google Tech Talk. Thanks for the continued hard work on Rcpp! -Whit 2010/10/9 Dirk Eddelbuettel : > > On 8 October 2010 at 23:26, Whit Armstrong wrote: > | Thanks again, Dirk. > | > | full example (sorry for the verbose post): > > Thanks for posti

Re: [Rcpp-devel] inline with classes

2010-10-09 Thread Dirk Eddelbuettel
On 8 October 2010 at 23:26, Whit Armstrong wrote: | Thanks again, Dirk. | | full example (sorry for the verbose post): Thanks for posting the full example! Let us know how you find it and how it helps you with CppBugs. Just briefly: | mat X(REAL(XR),100,2); | mat y(REAL(yr),100,1); Personal

Re: [Rcpp-devel] inline with classes

2010-10-08 Thread Whit Armstrong
Thanks again, Dirk. full example (sorry for the verbose post): library(inline) library(Rcpp) inc <- ' #include #include #include using namespace arma; using namespace cppbugs; class TestModel: public MCModel { public: const mat& y; // given const mat& X; // given Normal b; Uniform

Re: [Rcpp-devel] inline with classes

2010-10-05 Thread Whit Armstrong
Thanks for the example! that makes everything clear. -Whit 2010/10/5 Dirk Eddelbuettel : > > On 5 October 2010 at 13:21, Whit Armstrong wrote: > | aha, thanks for correcting me. on the inline/Rcpp division of labor. > | > | So, what you are suggesting should have been obvious to me. > | > | I p

Re: [Rcpp-devel] inline with classes

2010-10-05 Thread Dirk Eddelbuettel
On 5 October 2010 at 13:21, Whit Armstrong wrote: | aha, thanks for correcting me. on the inline/Rcpp division of labor. | | So, what you are suggesting should have been obvious to me. | | I pass the class def in the include statement of the inline function? | Is that it? | | I'll ping back aft

Re: [Rcpp-devel] inline with classes

2010-10-05 Thread Whit Armstrong
aha, thanks for correcting me. on the inline/Rcpp division of labor. So, what you are suggesting should have been obvious to me. I pass the class def in the include statement of the inline function? Is that it? I'll ping back after I try this. If this really works, then I think WinBUGS can fina

Re: [Rcpp-devel] inline with classes

2010-10-05 Thread Dirk Eddelbuettel
Hi Whit, On 5 October 2010 at 12:25, Whit Armstrong wrote: | I just reviewed the Rcpp documentation. Great. Now tell us how to make it sticky so that we get you to contribute :) | I see plenty of cfunction/cxxfunction examples, but I'm curious | whether one can provide a class definition inlin

[Rcpp-devel] inline with classes

2010-10-05 Thread Whit Armstrong
I just reviewed the Rcpp documentation. I see plenty of cfunction/cxxfunction examples, but I'm curious whether one can provide a class definition inline in an R script and then initialize an instance of the class and call a method on the class. all inline in R. Is this feature something you all