[Rcpp-devel] Favourite Rcpp examples?
On 27 April 2011 10:56, Dirk Eddelbuettel <edd at debian.org> wrote:
On 27 April 2011 at 10:29, baptiste auguie wrote: | Would RcppArmadillo be OK? I have a couple of functions / packages | using it with basic complex linear algebra calculations, together with | the original, slower R implementation. That would be perfect, yes. Mind you it is getting late as the course is in two days, but in a larger sense we _always_ want compelling examples to make the Rcpp / RcppArmadillo examples better still.
OK, sorry I've just come back from a Easter trip; it'll be too late for your original request but I'll tidy up some examples and post back when they're ready. By the way, have you considered setting up a sort of wiki so that users could share tips and short recipes with Rcpp? I find that archived emails are not always reliable as the code may change substantially with time, and vignettes + unit tests are more intimidating and not as convenient. ggplot2's wiki and stackexchange seem to work well for this purpose nowadays. Best, baptiste
Several folks kindly emailed me and spoke in favour of some sort of looped example. ?The example sent by Lance already lead to one (slightlt reworked) blog post (at http://dirk.eddelbuettel.com/blog/2011/04/23#rcpp_for_varsims); this uses RcppArmadillo to simulate a VAR(1) model. It has been added to the SVN repo of RcppArmadillo as well and will be in the next release. MCMC got a few mentions; I don't do much Bayesian analysis myself so I find most examples too involved. I looked again at Whit's old example based on his CppBugs code (on github). ?But I did get my copy of Albert's 'Bayesian Computation with R' out and worked one example of a basic (introductory) Monte Carlo study (which I hope to blog about in a few days). So a long-winded way of saying: Yes please! ?Rcpp users have been kind with suggestions; we added one example already and I am game for more. Show us what you got ;-) Cheers, Dirk -- Gauss once played himself in a zero-sum game and won $50. ? ? ? ? ? ? ? ? ? ? ?-- #11 at http://www.gaussfacts.com