- Series: Use R! (Book 64)
- Paperback: 220 pages
- Publisher: Springer; 2013 edition (June 4, 2013)
- Language: English
- ISBN-10: 1461468671
- ISBN-13: 978-1461468677
- Product Dimensions: 6.1 x 0.6 x 9.2 inches
- Shipping Weight: 1 pounds (View shipping rates and policies)
- Average Customer Review: 9 customer reviews
- Amazon Best Sellers Rank: #908,307 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Seamless R and C++ Integration with Rcpp (Use R!) 2013th Edition
Use the Amazon App to scan ISBNs and compare prices.
All Books, All the Time
Read author interviews, book reviews, editors picks, and more at the Amazon Book Review. Read it now
Frequently bought together
Customers who bought this item also bought
From the Back Cover
Rcpp is the glue that binds the power and versatility of R with the speed and efficiency of C++. With Rcpp, the transfer of data between R and C++ is nearly seamless, and high-performance statistical computing is finally accessible to most R users. Rcpp should be part of every statistician's toolbox. -- Michael Braun, MIT Sloan School of Management
Seamless R and C++ Integration with Rcpp is simply a wonderful book. For anyone who uses C/C++ and R, it is an indispensable resource. The writing is outstanding. A huge bonus is the section on applications. This section covers the matrix packages Armadillo and Eigen and the GNU Scientific Library as well as RInside which enables you to use R inside C++. These applications are what most of us need to know to really do scientific programming with R and C++. I love this book. -- Robert McCulloch, University of Chicago Booth School of Business
Rcpp is now considered an essential package for anybody doing serious computational research using R. Dirk's book is an excellent companion and takes the reader from a gentle introduction to more advanced applications via numerous examples and efficiency enhancing gems. The book is packed with all you might have ever wanted to know about Rcpp, its cousins (RcppArmadillo, RcppEigen etc.), modules, package development and sugar. Overall, this book is a must-have on your shelf. -- Sanjog Misra, UCLA Anderson School of Management
The Rcpp package represents a major leap forward for scientific computations with R. With very few lines of C++ code, one has R's data structures readily at hand for further computations in C++. Hence, high-level numerical programming can be made in C++ almost as easily as in R, but often with a substantial speed gain. Dirk is a crucial person in these developments, and his book takes the reader from the first fragile steps on to using the full Rcpp machinery. A very recommended book! -- Søren Højsgaard, Department of Mathematical Sciences, Aalborg University, Denmark
Seamless R and C ++ Integration with Rcpp provides the first comprehensive introduction to Rcpp, which has become the most widely-used language extension for R, and is deployed by over one-hundred different CRAN and BioConductor packages. Rcpp permits users to pass scalars, vectors, matrices, list or entire R objects back and forth between R and C++ with ease. This brings the depth of the R analysis framework together with the power, speed, and efficiency of C++.
About the Author
Dirk Eddelbuettel has been a contributor to CRAN for over a decade and maintains around twenty packages. He is the Debian/Ubuntu maintainer for R and other quantitative software, edits the CRAN Task Views for Finance and High-Performance Computing, is a co-founder of the annual R/Finance conference, and an editor of the Journal of Statistical Software. He holds a Ph.D. in Mathematical Economics from EHESS (Paris), and works in Chicago as a Senior Quantitative Analyst.
Top customer reviews
This book might be useful for people who already know very well both R and C++ but if like me you are just a good R user, it will be pretty much useless to you. I strongly recommend instead the chapter about Rcpp in "Advanced R", which is available online.
Also, the ebook version for Kindle is very bad, making it hard to read.
If you want to use R/C++ integration you need to be familiar with R and C++ first. That might sound silly, but it's an important point. I wasn't familiar with C++ when I started. I spent about two weeks going through a book called "Accelerated C++ coding," which was a bare minimum pre-req.
In addition, he often leaves out "obvious" parts of code in his book, but that aren't always that obvious for commoners such as myself. The learning curve for R/C++ integration is pretty steep, and unforgiving to those not willing to put in the time and intellectual effort.
In addition to this book, you will need to make full use of online resources on this topic. The book is absolutely not sufficient, or anywhere close for that matter.
There is also a low level of example code in general. This is not Dirk's fault, it's a more 'niche' coding community, so you have to be prepared to at times blaze your own trail.
Ultimately, if you are looking into R/C++ integration, you are concerned with fairly complex optimization and computational issues, and as a result should hopefully have experience learning tougher things.
I would have given this book 4/5 stars if it had a longer 30-50 page introduction, which gave a much more robust and thorough explanation. As it is now the introduction feels as though it were added as an afterthought, as it quickly rushes through lots of the 'basics', which are then taught again in following chapters. It is more of an overview, than a proper detail of how to actually write code in R/C++ starting at step 1.
I would have given this book 5/5 stars if it came with 3-6 mini-lessons and projects, which came in the form of existing code downloadable from Dirks' website. This would help with examples and code structure to help the starting coder get a handle on the myriad issues that often arise when trying to get R/C++/Compilers in communication.
But if you are reading this review, chances are you are using R/C++ integration. In which case you absolutely need this book, even if it could be better.
TL;DR: The author of the book is one of the main authors of the Rcpp package, and given that there has been relatively few in-depth guides written for it (one exception being Hadley Wickham's Rcpp guide), this is a sorely needed reference to anyone who uses Rcpp.
In-depth: If you have not yet been made aware of how awesome it is to have the flexibility of R and speed of C++ together in a single coherent script, please browse [...] before reading on. Personally, I love Rcpp because this tool enables me to decide how much C++ I want to do, and minimizes the quirks/annoyances of the C api in R. For example, I could decide to build entire classes in C++ and have multiple inheritance structures that are known to be slow in R, or I could simply port the for-loop speed bottleneck portion of my R code into C++. Note that the main advantage of having Rcpp is the "seamless" aspect of doing things. While a power user of both R and C++ can easily write code in both languages and put them together, Rcpp allows the rest of us to harness the benefits of both languages with massive payloads upfront, and then we can individually decide how much more we want to get out of C++.
A working knowledge of R is assumed, and while you should probably understand how R handles classes via S3 and S4, the book does a good job of easing you in otherwise. C++ knowledge is advised, but again one of the key points of Rcpp is that you should not have to be a C++ guru to use it in R. There is also an appendix in the back that offers a brief introduction to C++. There are multiple good C++ intro books out there, one of them being: Accelerated C++: Practical Programming by Example. Check out the following [...] for a more in-depth list.
While some of the information from this book can be gleaned from the Rcpp website and the various vignettes found there, there are definitely more in-depth and clear explanations and examples here. Reading just the first 4-5 sections have already made this book highly worth it to me. Another great section is the one on using Rcpp inside an R package if you plan to write one.
The book also has sections on RInside, RcppArmadillo (Armadillo is a modern C++ linear algebera library), RcppGSL (GSL is the GNU scientific library, which provides many numerical routines for C and C++). While I personally have not used either of these libraries, they come highly recommended and I will be getting to them soon.
Reviewer's background: statistics phd, frequent R user