Book Review: R High Performance Programming

A book review by Douglas M. Wiig

Aloysius Lim and William Tjhi. R High Performance Programming. Birmingham, UK: Packt Publishing Ltd., 2015. bit.ly/14Rhpp

R High Performance Programming is a well written, informative book most suited for the experienced R programmer. This book offers a handy guide for R users who need speed and efficiency for the tasks that they perform.

The authors begin with an informative chapter discussing some of the inherent constraints on R’s computing performance such as CPU and RAM usage, and how R code is interpreted on the fly rather than compiled. A guide to several methods of profiling R’s code execution time, memory allocation and CPU usage is discussed in the next chapter. Sample code included in the chapter allows the reader to experiment with various benchmarking techniques to measure processing time and memory usage. This chapter provides the reader with some good tools for benchmarking R projects and identifying areas where improvements in processing can be made.

As is always the case with technical books from Packt Publishing, ample code examples are used in the chapter and the complete code used in each chapter is available for download with the book. This is a very handy feature and allows readers to do some live programming with R as the book is read.

The authors discuss a number of simple tweaks that can be easily performed to increase processing speed such as using built in functions and using hash tables. The hash table technique is useful for applications that use frequent lookups and can dramatically reduce processing time when compared to the use of lists. Running example code using this technique shows a large decrease in processing time when using the hash table approach as compared to straight list processing lookups.

In chapter 4 the authors discuss the use of compiled R code and integrating compiled languages into R code. They show several examples of using the R package inline that allows users to embed C, C++, Objective-C, Objective-C++ and Fortran code within R. Once again there are ample code examples to illustrate the use of this technique. For more advanced uses of compiled code the authors discuss how to create entire modules coded in C++ using the Rcpp package. Several completed code examples are included to illustrate the technique.

Another interesting approach to speeding up R is discussed in a chapter that explores several R packages designed to exploit the capability of GPU’s (Graphic Processing Cards) that are a used in many computers. These techniques can facilitate creating very fast and efficient statistical modeling code using R and the GPU.

As indicated above, readers can download the code package included with the book and find a well-organized set of ten folders (one for each chapter) containing 51 files. These files contain the sample code from the book as well as other code segments and benchmark code discussed in the book. The authors indicate that the code has been tested on R 3.1.1, Ubuntu 14.04 Trusty Tahr, Mac OS X 10.9 Mavericks, and Windows 8.1. This allows integration of these code segments into the reader’s own projects with minimal changes.

Other chapters in R High Performance Programming discuss simple tweaks to use less memory, techniques to speed processing of large datasets and using parallel processing and clustering techniques. The last chapter contains a discussion of using R and Hadoop to process Big Data (massive datasets with sizes measured in petabytes -one petabyes is 1,048,576 gigabytes). Processing data of this magnitude presents many challenges and is an area that is currently the subject of much program development.

I found R High Performance Programming to be a useful and informative book for the advanced user of R. A working knowledge of statistics, R and other programming languages such as C++ or Java is necessary to realize the full benefit of the techniques presented in the book. The book also serves as a good learning tool for less knowledgeable R users who are seeking to advance their programming skills.

Readers who are interested in the use of Hadoop and cluster computer processing might find the book Raspberry Pi Super Cluster by Andrew K. Dennis of interest. (Packt Publishing, 2013

PAC-14-1987838-1387169). A review of this book can be found on my web site at http://dmwiig.net.

Reviewer Information:

Douglas M. Wiig, Professor of Political Science

Grand View University

Teaching areas include social science statistics and research methods, comparative politics, international politics.

Long time user and developer of computer and statistical applications

Host of Open Source Technology in Higher Education web site at http://dmwiig.net

Creator and moderator of LinkedIn discussion forum “Open Source Technology in Higher Education”

Regular contributor to several LinkedIn discussion forums

Author of numerous tutorials on using the R statistical programming language and Raspberry Pi computer

Advertisements

3 thoughts on “Book Review: R High Performance Programming”

  1. VMN is good for companies because users don’t have to pay premium charges to deliver messages. They are billed regular tariff prices for sending SMS to VMN. Such a number enables users to deliver SMS to your application centre which is right on your desktop.

    Most VoIP companies also provide digital figures. A digital numbers is an inexpensive secondary line that rings to the main VoIP line. In an additional example: let’s presume that you reside in San Francisco exactly where your primary VoIP telephone number has a 415 area code. Your mother-in-law lives in Florida and her region code is 561. You can get a get virtual sms number with a 561 area code that rings to your primary line in San Francisco. That way, your mother-in-law can contact you everyday without having to pay long distance telephone costs. This advantage alone should convince you to change over to VoIP!

    Whiteboard / dry-ease. A white board is a great tool for organizing. Nothing half whiteboards / bulletin board half come in the type. This little instrument allows you produce to-do checklist, brainstorm, shop reminders, and the short-term record info.

    You get tons of included attributes. Stop paying additional for calling attributes as most VOIP providers offer a plethora of features for totally free. Some of these attributes might consist of 3 way contacting, voicemail, voicemail to e-mail, e911, caller ID, and numerous more.

    With VoIP, “local” in North America almost always consists of each the US and Canada; some also include Western Europe, components of Asia and components of Latin America. For those nations not included totally free, worldwide ideas are accessible for much much less than regular LD companies. Or you can make occasional calls without a strategy for far reduce for each-minute costs than most LD plans. This generally applies – more or less in reverse – for VoIP solutions in Europe, Asia and elsewhere, as well.

    From that stage duplicate the file over to your Kindle via USB, use ES File Explorer to start the installer (I formerly understood how to use ES File Explorer in YouWave, but I apologize, I completely forgot where it was stored).

    http://ssic.ir/Default.aspx?tabid=56&userId=56055

    Like

  2. Hello admin, i must say you have high quality
    content here. Your page should go viral. You need initial traffic only.

    How to get it? Search for; Mertiso’s tips go viral

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s