Jump to ratings and reviews
Rate this book

The Book of R, 2nd Edition: A First Course in Programming and Statistics

Rate this book
Produce statistical summaries, visualizations of your data, and more with the new edition of this beginner-friendly guide to R programming.

Even if you have no programming experience and little more than a grounding in basic math, The Book of R, 2nd Edition will teach you everything you need to know for using R effectively in statistical analysis.

You’ll start with the basics, like how to handle data and write simple programs, before moving on to more advanced topics, like producing statistical summaries of your data, performing statistical tests, and modeling. You’ll also learn how to create impressive data visualizations with R’s graphics tools and contributed packages, like ggplot2 and ggvis, as well as interactive 3D visualizations using the rgl package. Over 30 of hands-on exercises (with downloadable solutions) take you from theory to practice, as you

The fundamentals of programming in R, including how to write data frames, create functions, and use variables, statements, and loops
Statistical concepts like exploratory data analysis, probabilities, hypothesis tests, and regression modeling, and how to execute them in R
How to access R’s thousands of functions, libraries, and data sets
How to draw valid and useful conclusions from your data
How to create publication-quality graphics of your results

The second edition has been revised and updated from start to finish, with new content that expands the book’s coverage of statistical operations, data plots, date-time-objects, and more — including dozens of fresh exercises to strengthen your skills.

Combining detailed explanations with real-world examples, The Book of R is your doorway into the wide world of data analysis.

936 pages, Paperback

First published November 25, 2015

98 people are currently reading
273 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
25 (37%)
4 stars
26 (39%)
3 stars
14 (21%)
2 stars
1 (1%)
1 star
0 (0%)
Displaying 1 - 7 of 7 reviews
Profile Image for Mikhael Hayes.
111 reviews
April 25, 2025
So glad to be done with this. It does the job, but it makes me feel like it's 2008 and I'm learning to type or something
Profile Image for Mike Harris.
240 reviews4 followers
July 15, 2019
This book has one of better over views of R and statistical modeling for people new to R and statistical modeling. Maybe if I did not read it cover to cover and just read the middle part I would have given it a 4 but I felt that the last section on graphs just dragged on.

I did almost all of the exercises and found them to be okay for re-enforcing the content.

The diamond data 404s now but if you use the diamond data set that comes with ggplot2 you’ll be able to follow along with the examples and do the exercises which use the diamond data set.
Profile Image for Jaime.
4 reviews
March 25, 2020
A great approach to learning R and how to implement it into a working environment of Data Analysis and database management.
Profile Image for Nathaniel Inman.
42 reviews2 followers
July 28, 2022
It's rare to see an author that not only covers a language breadth but also isn't afraid to reach depths in practical applications. This book is tailored towards a computer or data scientist, although the layperson with a good foundation in discrete math, calculus and statistics will feel comfortable. The first third covers the language itself, slowly introducing language semantics and common patterns before sliding into statistical analysis such as p values, linear regression, etc. If I had to nitpick, from an engineering perspective I would have enjoyed digging into the S4 structure. My page tabs are on 48, 84, 97, 130, 171, 176, 207, 227, 242, 251, 274, 278, 298, 326, 369, 378, 387, 391, 405, 460 & 463.
Profile Image for Christopher Hall.
69 reviews1 follower
December 29, 2017
Excellent book. This took me from no knowledge of R and relatively little knowledge of programming to being conversant in R. And I got a job offer partly as a result of my skills in R!

The book covers the basic aspects of programming all the way to introducing complex statistical concepts and creating full-color 3D plots. Each section (about 4 per chapter) has exercises to practice the concepts covered.

I know I'll be using this a reference for years to come.
Displaying 1 - 7 of 7 reviews

Can't find what you're looking for?

Get help and learn more about the design.