Annoucing the Rcpp Gallery

January 8, 2013
By

(This article was first published on Thinking inside the box , and kindly contributed to R-bloggers)

Earlier this morning, JJ announced what we had been working on for the last few weeks: the Rcpp Gallery.

Now, as our luck will have it, the Rcpp-devel list received his message but did not transmit it for an apparent mail system outage at WU Vienna: no sign at the Gmane archive of rcpp-devel or in the personal mailboxen of myself or anybody I spoke to. Hence, so far, and preceding this blog announcement, the only way word got out was via this earlier tweet of mine from about 12 hours ago.

The Rcpp Gallery is really the brainchild of JJ. It builds on what he contributed over the last few months in not one but two implementations: Rcpp Attributes. These are described in a vignette of their own. They provide very powerful new functions like sourceCpp which allow the easiest-yet way to get compiled code into R---see for example these posts from my blog about simulating pi in essentially five lines of R or five lines of C++, or this post about using the GSL with ease from R. The Rcpp Gallery also builds on Yihui's excellent knitr package which gained the ability to process C++ code just like R code, as well as some Ruby / Jekyll magic to build a website on the github infrastructure. I helped a little on the side by (at long last) learning how to do prettier websites thanks to Boostrap and its theming extensions.

So what does it do, and what is it for? Have a look around the Rcpp Gallery site. Each post is based on a single C++ (or Markdown) file which gets digested by knitr and Rcpp, with the actual output shown alongside the marked up code and explanatory text. Raw sources are available, just pass them into the sourceCpp() function from a current Rcpp release and you should have the same output.

Our idea is to have this as a repository for useful code: from simple and introductory to fancy and featureful. We already seeded it with several dozen posts covered anything from lesser known but powerful STL idioms, to Rcpp sugar, to tieing in Armadillo or GSL, random number generation and of course benchmarking---as we do love performance.

The entire content is in this github repository, and our page on how to contribute details how you can get involved.

We are looking forward to what is to come. In many ways, we are only just getting started.

To leave a comment for the author, please follow the link and comment on his blog: Thinking inside the box .

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.