A Tour of Statistical Software Design - The Art of R Programming

ByNorman Matloff

feedback image
Total feedbacks:18
11
4
2
1
0
Looking forA Tour of Statistical Software Design - The Art of R Programming in PDF? Check out Scribid.com
Audiobook
Check out Audiobooks.com

Readers` Reviews

★ ★ ★ ☆ ☆
erica cresswell
The book has some content, but as other reviewers noted, it is bad-organized and insufficient. The same way that in R the data frame is some sort of utilitarian ostrich that can sing, fly and run, this book is a crossing between a tutorial, a programming guide and a programming reference, albeit it does not excel at any.

Things that could have helped the book is a start with a more conceptual analysis of the data-structures in R, after all, there is plenty of free information in the Internet with "informal descriptions" of R lists, arrays, vectors, and subsequent paraphernalia of ways of aggregating data. I should be fair and add that the book simply can not describe something that apparently does not exist, i.e., R as a coherent data-handling framework.

In the good side, the book enforced my belief that R is a backwater in terms of programming environment/language, even if it does have a lot of statistical functions that successive generations of statisticians inmates have left there.
★ ★ ☆ ☆ ☆
stefyberto bertolini
I bought this book because I have some background with modelling programs like Mathematica, MATLAB, etc. I've taken stats classes and I wanted to use R for a new modelling project I am working on. This has very little on the primary reasons people use R... to handle massive data sets easily and run regressions. I would recommend another book if you understand the basics of math modelling programming, and need to get into the nitty gritty.
★ ★ ★ ★ ★
tally
Jason's juxtaposition of "data analysts" and "serious R programmers" strikes me as a little unfair, but I see what he means. Consider yourself a "serious R programmer" (SRP), and buy this book, if you are interested in the following aspects of R:

Variable scope - Chapter 7
User-defined classes - Ch 9
Debugging - Ch 13
Profiling and performance (mostly, vectorization) - Ch 14
Interfacing with C/C++ and Python - Ch 15
Parallel computation ("pure R" approach using "snow" package, and C++-aided approach using "OpenMP" library) - Ch 16

I have not seen the material of Chapters 15-16 in any other R reference; the other topics have shown up elsewhere - in "R in Nutshell", for example - but get more attention here. The chapters would have been much shorter if written in a "Nutshell" style; however, I do not automatically consider a verbose, user-friendly writing style a negative.

The early chapters introduce R in a way similar to other books - except for (a) eschewing discussion of the language's statistical repertoire, which makes sense given "programming" focus, and (b) showing a greater interest in the "matrix" class - and although they do it quite nicely (this said, let me ask the author to reconsider his "extended examples"), I would not recommend "Art of R Programming" to non-SRPs, and point them to Robert Kabacoff's "R in Action" or (the E-Z version) Paul Teetor's "R Cookbook" instead.

Overall, while the book did not quite click for me - I am a "data analyst" and at present do not have much "need for speed" (cf. C/C++); on the other hand, I would like a firmer grasp on R's OOP, but here, "Art of R Programming" only whets one's appetite - I cannot deny its quality and unique value for budding SRPs. If there was any wavering between four and five stars on my part, the appreciation of how pretty and inexpensive the book is tipped the scales.
About That Night (FBI/US Attorney Book 3) :: My Kind of You (A Trillium Bay Novel Book 1) :: Underneath It All (The Walsh Series Book 1) :: It Happened One Wedding (FBI/US Attorney Book 5) :: Hacking: The Art of Exploitation, 2nd Edition
★ ★ ★ ★ ★
abhilasha
As a disclaimer, I am still in the beginner stage of learning R, and have collected several books on the subject including a couple of O’Reilly Series books. This book is the best of the lot. Dr. Matloff writes clearly, a skill too often lacking in writers of technical books. I have experience in a number of mainly procedural programming languages, and I find his frequent references comparing R structures to those in other languages extremely helpful in expanding my understanding of the nuances of R. An example is his coverage of the scoping rules of R. Veterans of other languages will find the scoping rules of R interesting, to say the least. Dr. Matloff covers this subject with a comparison to C, and he gives the pros and cons of using global variables when writing R code.

There are many coding examples, and the scope of his coverage of the language is very broad, as evidenced by the table of contents. He had to be brief in his examples because of the large coverage of the subject, but the examples are instructive, thoughtful, and adequate.

I recommend this book for anyone who is climbing the steep hill of learning R. It serves me as a desk reference when programming, but I also find it in instructive casual reading. I suspect those experienced in R programming may find this book too basic, but for the beginning to intermediate R programmer, this is an excellent choice from the several books available on the subject of R programming.
★ ★ ★ ★ ★
sara samiee
This book IMHO is an excellent starting point for learning R. I'm finding it really useful for beginners like me to learn this new programming language. The book is comprehensive and well-illustrated.

The initial chapters talk about the foundation concepts like vectors and matrices. The examples are simple enough to start with, while the author leaves some room for self-experimentation. The latter chapters describe the advanced capabilities like graphics, debugging and performance tuning.

Needless to say, I'll require a lot of practice to get comfortable thinking in R terms, but this book definitely laid the stepping stone for me.
★ ★ ★ ★ ☆
abigail shiningshawol
This is an excellent books which brings out the salient features of R as a programming language. Rather than focusing on different statistical libraries available with R, the focus is more on R as a programming language and features that make it shine for statistical applications.

Good things about this book
-----------------------------
- The writing is very clear and succinct.
- The concepts are illustrated very nicely with lot of examples. The central concepts of R like vectorization, recycling have been given excellent treatment.
- The R data structures list,vector, matrix, data frame,array and factors have been covered very well with good amount of examples.
- The book covers best practices in R. R way of doing things - apply category of functions instead of loops, ifelse etc are explained very well.
- The sections on debugging and performance tuning of R are very good.

And few bad things
---------------------
The reason that I am not giving 5 stars is that -
- Lack of practice exercises. I think the best way to learn a language is through practicing. Some hands on practice exercises at the end of each chapter would have been a great addition.
★ ★ ★ ★ ☆
alycia
First things first, this book really lives up to its name! It's a thorough introduction to programming in R, aimed at software developers. This is not the book for you if you want to learn about the statistics side of R or how to make prettier plots, there are plenty of books about that anyway.

What I really like is that the author never tries to "sell" R to the reader. This is rather refreshing, because I always get turned off when books start with a sales pitch for something I already clearly showed interest in by purchasing the book. R is a rather specialized language and chances are that you know why you want to solve a given problem in it, and if you don't, this might not yet be the book you should be reading anyway. The first few chapters cover the language's basic data structures like vectors, matrices, arrays, lists and tables, before chapter 7 introduces various flow control structures. What follows is a chapter on doing math and simulations in R, which is not overly long but gives some good examples of what the language is useful for. The next chapter is very interesting, it deals with R's object oriented features and describes the differences between S3 and S4 classes as well as their respective up and down sides. After this the author covers input/output, dealing with strings and R's graphing capabilities. He never gets lost in detail, but provides you with enough info to be able to explore these areas on your own. What really makes the book special though are the last few chapters, where Matloff covers debugging (a topic he also wrote an entire book about), performance tradeoffs, interfacing R with other programming languages (using functions written in C/C++ from R, as well as using R in Python) and various approaches to parallelizing R. While none of this may sound super exciting at first -- apart from parallelism maybe -- these are important issues in the daily lives of software developers and way too many books only gloss over them.

Now for some criticism: personally I don't find the author's style very engaging, it's rather dry and boring at times. Since it's clear that Matloff is an absolute authority on the topic of R this doesn't way too heavily, but still deserves a mention. Also for my personal taste there are slightly too many forward references in the text, although that's hard to avoid if you want to properly cover a language. I also found it rather odd that at one point the author mentions that explicit return statements aren't exactly idiomatic in R, but that he will keep using them for the benefit of readers unaccustomed to the language. Given that this was a few chapters in, it would have been a perfect spot to switch to the more idiomatic style from then on, but maybe that's just me being nitpicky. I also noticed several little typos and misspellings, something I'm not really used to from No Starch Press.

All in all this is a very solid book, which you definitely should pick up if you want to learn programming in R!
★ ★ ★ ★ ★
poppy englehardt
I'm always very wary of books about programming that have titles in the form "The Art of ... Programming", but this book is good despite the title. Matloff is clear and thoughtful writer who takes the reader through their first steps with R (which has a syntax that requires learning as it is nothing like other languages that a regular programmer would have encountered).

I did find, however, the comparisons with C programming annoying in the first part of the book. The author continuously goes on about "if you're a C programmer" and then some comparison to C. I didn't find this helpful (and I am a C programmer) and I think it could have been safely left out. A good example of this is on page 12 where is says "Matrices are indexed using double subscripting, much as in C/C++, although subscripts start from 1 instead of 0." So pretty much not like C/C++. That's a good example of how the C interludes don't help the new reader.

Just occasionally the author gets ahead of himself. Early on in the book he introduces matrices and on page 28 does a matrix addition in the form m + 10:13. He hasn't explained how that addition is going to work.

However, these complaints are pretty minor. The book does a good job of taking you from knowing nothing about R to working with complex programs and data. The chapter on S3 and S4 classes is particularly welcome, but I think it could have been more in depth and earlier in the book. They are an important topic.

Overall this is a very good book to learn R from and has enough depth that the experienced R user will find useful things in the later chapters.
★ ★ ★ ★ ★
carra davies
Anyone seeking to learn R faces two major challenges: (1) learning how to swim in the sea of information: R packages, books, websites, blog posts, message boards etc. that threatens to drown a newbie and (2) and coming to grips with the structure, syntax and features of the language itself. Having some idea of what one wants to do with R is clearly an important first step that will set the path of learning. R, an open source computer language, is the premier software system for statistical computing. Not only can any statistical idea be expressed in R, it is likely that someone in the open source community has already written a function to accomplish or at least facilitate any statistical analysis a working statistician or data scientist might be contemplating.

R functions are organized into libraries or packages that usually relate to some particular statistical task. Assuming something like an average of 20 functions per package, the 3400 available contributed packages offer over 68,000 routines to read in data, manipulate it analyze it and visualize the results. No one could possibly become familiar with all of these. But, because R is an interpreted (instant feedback) language that encourages experimentation, some serious, sophisticated statistical analyses can be accomplished by stringing together the appropriate functions into a script. If interest in R is to only perform some particular analysis then a beginner's best bet might be to select one of 100 or so books or blogs on doing statistics with R that provides relevant sample code and cut and paste to get a workable script. There is no shame in this. That is why all the open source authors went to the trouble of packaging up their work.

However, if a person really wants to be able to speak the R language and become a competent R programmer then, at the present time, one can find no better guide than Norman Matloff's The Art of R Programming. Professor Matloff is a statistician and a computer scientist with a considerable amount of teaching experience. His book is no mere programming reference guide. It is a carefully crafted sequence of lessons that start at the beginning and work up to some fairly advanced topics including a lucid account of object-oriented programming in R, a presentation of the rudiments of TCP/IP operations and a discussion of R programming for the internet, examples of parallel programming with R, and a discussion spanning several chapters of how to write production-level R code that includes methods and advice on debugging R code, writing efficient R code, and interfacing R with other languages. Other distinguishing features of the book are brief examples showcasing a large number of functions (including rare gems such as D() for symbolic differentiation) that indicate the power and scope of R, and over thirty "Extended Examples" each of which is a credible study in writing careful, professional code. The most captivating aspect of the book, however, is Matloff's thoughtful manner of exposition. R's rich, compact syntax can be challenging the first time around. Matloff knows where the difficulties are. His presentations of R's various features and functions begin from a point of view that anticipates obstacles that likely to confound someone going down the R path for the first time and guides the novice around them. I expect that The Art of R Programming will appeal to diverse audience of aspiring R programmers.
★ ★ ★ ☆ ☆
boris
The author jumps the gun in introducing topics. The author presents examples that cover topics that haven't been fully explained. In example 2.9.1, the author uses the lapply function- a function that isn't fully covered until chapter 4. Section 2.9 describes the ifelse function. Why doesn't the author simply provide an example based on topics from chapters 1-2.9? Each successive section should build on the prior. As a student, I find this jumping back and forth discouraging.
★ ★ ★ ★ ★
yusefmas
This book goes well beyond how to use this statistical programming language to work with statistics and treats it as a proper programming language. It provides you with everything you need to know to use the R language.

Perhaps the most surprising thing I noticed in this book when I looked through the contents page before I started reading through the book itself was just how short the appendix is that explains how to install R onto your computer. The reason why that appendix is so short became obvious when I actually followed those instructions. R has to be just about the simplest programming language to install that I have come across.

Getting into the actual material in the book itself and in the introduction the object oriented approach of R is compared to the approach taken by other statistical languages. After having worked through some of the examples the author presents in the book I definitely agree with the comments on how much easier R is to use compared to SAS. I can't comment on the similar comparison with SPSS having never used that language. The functional approach with regard to avoiding loops in your processing is somewhat more familiar with respect to statistical programming.

The book presents all of its material in a very logical progression starting with the basics, moving through all of the regular statistics related topics and then moving on to more advanced programming topics beyond what would normally be covered in a book about a statistical language. Anyone with at least some knowledge of statistics or statistical programming languages should have no trouble in following through the various examples in the book in order to actually learn how to use R (at the time of writing this review I have read through the entire book but have only actually tried running some of the examples but I can't see any reason why the examples I haven't run yet would be any more difficult to work through than the ones I actually tried). The only people who might have trouble with learning R from this book are those without any knowledge of statistical programming who may not immediately understand the types of data structures that such a language uses which are somewhat different in some ways from what you'd expect in a programming language not specifically intended for statistical use. The book does define each structure sufficiently that those people should at least be able to figure out how the structures work even if it is not so obvious to them as to why the language supports those structures rather than what they are used to. It has been a while since I last did any statistical programming (using SAS) and so it took me a short while to re-familiarise myself with how statistical languages work.

With the R language being a free download available for all common operating system and with this book giving complete coverage of the language demonstrating that it is at least as powerful as other statistical languages, there is no reason why anyone with a need for statistical programming ought to choose any approach other than to obtain a copy of this book and work through it as far as they need to to obtain the required results. Any other approach would be more expensive and far less efficient.
★ ★ ★ ★ ★
eileen jacob
Many R books written in perspective of developing quick visualizations or conducting statistical analysis. This book is mostly written for serious programmers. Author spent lot of time in explaining how R data structures are constructed. You would not find this information in any other R books. If you are looking for serious programming in R, this book is for you. If you are looking for statistical analysis you may consider other books. However this book also offers basic statistical analysis.
★ ★ ★ ★ ★
theehill
This book is most useful to those who are already using R. It introduces logic and system to the language often learned in non-systematic ways.

I read the book when it first came out two years ago. It helped me find structure in R. Before reading the book, I believed that extensive libraries were the main reason to use R rather than another language. Norman Matloff showed me there was more to R than the libraries.

It is not a monograph. The book is an introductory and has excellent examples. The examples alone are enough of a reason to read it for anybody who wants to learn or improve his R. I give it 5 stars without hesitation.
★ ★ ★ ★ ★
natascia
Norm Matloff is my former professor and his classes are just as enjoyable as his books, which NoStarch Press have sent me review copies.

The Art of R Programming is a straight forward explanation of R for programmers who are reasonably familiar with programming in another language. Matloff makes no assumptions of expertise in C or algorithms and his explanations are succinct and easy to follow.

If you're aren't familiar with R, it is a statistical programming language, with some similarities to Matlab.

Rating 9/10

The big advantages of R are (1) it's high level, (2) reasonably easy to read, (3) functional in nature, (4) simple syntax. If you're familiar with Python, it has a similar feel. Compared to complex languages such as C++, Java, etc, R is a breadth of fresh air due to the lightness of its syntax. That said as a programming language Python is nicer. R has a few annoyances (for me at least) that make it less pleasant to write in than Python.
A couple of those are:

Non-standard assignment operator e.g. to assign 5 to x in R we use "x <- 5" instead of the normal "x = 5" used in other languages. This is annoying because a significant amount of programming is doing assignments and a two character assignment operator is twice as much typing. Contrast this with Python which uses the plain "x = 5".

Vector creation using "c(1,2,3,4)". Vectors in R are similar to lists in Python, it would be more natural to add a little syntactic sugar and use "[1,2,3,4]" for vector creation i.e. the same syntax as Python and many other languages.

The real reason to use R are its statistical libraries, it's very widely used for statistics and is the most pleasant environment to work in.

Much of the material is available online in tutorials such as John Cook's, R Language For Programmers. The real gems are the chapters "Writing Fast R Code", "Interfacing R to Other Languages", and "Parallel R". These chapters have great information that is not easily discoverable otherwise.

"The Art of R Programming" is a fun read, albeit somewhat specialized. If you need to do statistical work as a programmer I highly recommend buying it and spending an afternoon browsing it.
★ ★ ★ ★ ★
paul papadeas
I have found this book extremely useful. It gives very clear examples going from easier to harder one, which helps you not only to learn the subject but also to develop good programming practices. The content is also organized in such a way that you can progress from knowing nothing to an upper intermediate level in programming. If you have no previous experience either in programming or in using R, this book definitively will help you to make you way through it.
★ ★ ★ ★ ★
irfon kim
This book is the standard for learning R programming, a powerful multifunctional language. The author, a professor of computer science, provides an in-depth tour of the process of software development, from the basics to advanced topics.
★ ★ ★ ★ ☆
joshua robbins
Pros:

R can be notoriously difficult to learn. This book shows the difference between 'writing code in R' vs 'writing R code'. Reading the free R tutorials online, I could never know how important writing vectorized code in R is. But I guess you get what you pay for.

Cons:

Matloff can be verbose at times, and consequently you could have a hard time separating wheat from the chaff. I think the book could have been shortened by at least 30%.

The biggest drawback is that you would outgrow the need for this book *very* quickly. It is like the need for a stroller when we are babies - they are very necessary during the first few days of our lives, but after that, we won't use them ever again.

Summary

Definitely worth a read (a few reads, actually), but borrow it from a friend/library/wherever to skim through it. This is by no means a K&R style reference book that you would find yourself coming back to over and over again (and to be fair to the author, he does not claim it either).
★ ★ ★ ★ ☆
michele hill
A really good R tutorial for starters, especially when you already have basic knowledge of any other programming language and know very little about stats. I have only learnt Java for one year before and I found it not hard to learn R with this book. Concepts are well explained with examples.
However, it would be even better if there could be some more practice problems.
Please RateA Tour of Statistical Software Design - The Art of R Programming
More information