Book review -- The Book of R: A First Course in Programming and Statistics

book of r
Credit: no starch press

by Tilman M. Davies, no starch press, 2016

You might not have ever heard of the programming language R but, if you're doing data analysis, it might be just the language you need. And this particular book on R is one that is likely to teach you everything you might need to know. Yes, I mean everything.


A full two inches thick and nearly 800 pages long, The Book of R promises to teach you everything you need to be productive in using this language – that includes the basic syntax of the language, programming techniques, statistics and probability, testing and modeling, and graphics along with how to install the language and related packages on your system.


And, if you feel a little tremor of intimidation when you lift this book off of your shelf or start slipping your fingers through its pages, try to calm yourself. The exercises and explanations the book provides on how to use this language to build your own data analysis tools are likely to be the best you will find anywhere and you're likely to find all the help you need as you read through each chapter. This is a book meant for beginners whether you're new to programming or new to statistics or both. And I expect that you'll emerge from the appendices feeling like you've just been through a couple really good courses with an excellent professor.


Scanning the table of contents illustrates the length and depth of the covered material.

Table of Contents


1 Getting Started
2 Numerics, Arithmetic, Assignment, and Vectors
3 Matrices and Arrays
4 Non-numeric Values
5 Lists and Data Frames
6 Special Values, Classes, and Coercion
7 Basic Plotting
8 Reading and Writing Files

9 Calling Functions
10 Conditions and Loops
11 Writing Functions
12 Exceptions, Timings, and Visibility

13 Elementary Statistics
14 Basic Data Visualization
15 Probability
16 Common Probability Distributions

17 Sampling Distributions and Confidence
18 Hypothesis Testing
19 Analysis of Variance
20 Simple Linear Regression
21 Multiple Linear Regression
22 Linear Model Selection and Diagnostics

23 Advanced Plot Customization
24 Going Further with the Grammar of Graphics
25 Defining Colors and Plotting in Higher Dimensions
26 Interactive 3D Plots (AVAILABLE NOW)

A Installing R and Contributed Packages
B Working with RStudio (AVAILABLE NOW)


View the detailed Table of Contents (PDF)
View the Index (PDF)

You can also read about this book on the no starch press site.

Not only does the book take you through all the material you need to go from knowing nothing to becoming adept at using this language for statistical programming, but it contains plenty of exercises to help you practice and gain confidence in your newly developed skills. And, to add to that, solutions (with source code) for the exercises are available in a file that you can download from the web site.

book of r exercises Sandra HS

Extremely well written with excellent explanations and examples, this book fully accomplishes the goal of providing the reading with both the programming and statistical skills required to become proficient with this language. I am nothing short of amazed at the consistent quality and clarity of the text and the utility of the exercises.



The language R is not a new language. It was initially released in 1994 and the first stable beta edition was released in 2000. It's based heavily on a language called S developed in the 60's and 70's. It's called R instead of the expected T because its name was based on the developers' shared first initial. Anyone who's been using Unix as long as I might remember that the language C followed on the heals of one called B. Neither S nor R, however, implies that we progressed from D through Q.


R is available for numerous operating systems, including Linux, Solaris, Windows, and Mac OS X. It's a language that has been specifically built to be a software environment for statistical computing and graphics, not a general purpose programming language such as C.


Tilman M. Davies, the author of The Book of R, teaches at the University of Otago in New Zealand and has been programming in R for 10 years.


This article is published as part of the IDG Contributor Network. Want to Join?

17 tools to protect your online security
View Comments
Join the discussion
Be the first to comment on this article. Our Commenting Policies