(This article was first published on Revolutions, and kindly contributed to R-bloggers)
We've written before about how you can use the Rcpp package to speed up R, by converting performance-critical snippets of R code to C++. (Rcpp makes it easy -- you don't even have to be a C++ expert.) If you haven't tried it out yet, you might want to browse the Rcpp Gallery: an collection of simple but illustrative examples showing many ways that Rcpp can help. A few choice entries:
- A one-line C++ equivalent to Mathematica's "Clip" function runs 5x faster than optimized R code
- Calculation of matrix eigenvalues in R using the Eigen C++ library
- Accessing the date-time attributes of R xts time series objects from C++ code
- Using a simulation method to estimate pi (note how similar the R and C++ versions are)
You can find many more examples in the gallery at the link below. If you're interested in making a similar gallery yourself, creator Dirk Eddelbuettel shares some behind-the-scenes making-of details.
Rcpp: Rcpp Gallery
To leave a comment for the author, please follow the link and comment on his blog: Revolutions.
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,ecdf, trading) and more...

Zero Inflated Models and Generalized Linear Mixed Models with R.
Zuur, Saveliev, Ieno (2012).