The Book of R, 2nd Edition
This long-awaited second edition folds years of updates into its beginner-friendly lessons on using R for data and statistical analysis.

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 explore:

  • 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.

Includes one 8-page full-color insert.
1146117578
The Book of R, 2nd Edition
This long-awaited second edition folds years of updates into its beginner-friendly lessons on using R for data and statistical analysis.

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 explore:

  • 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.

Includes one 8-page full-color insert.
79.99 Pre Order
The Book of R, 2nd Edition

The Book of R, 2nd Edition

by Tilman M. Davies
The Book of R, 2nd Edition

The Book of R, 2nd Edition

by Tilman M. Davies

Paperback

$79.99 
  • SHIP THIS ITEM
    Available for Pre-Order. This item will be released on November 25, 2025

Related collections and offers


Overview

This long-awaited second edition folds years of updates into its beginner-friendly lessons on using R for data and statistical analysis.

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 explore:

  • 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.

Includes one 8-page full-color insert.

Product Details

ISBN-13: 9781718503687
Publisher: No Starch Press
Publication date: 11/25/2025
Pages: 908
Product dimensions: 7.00(w) x 9.25(h) x (d)

About the Author

Tilman Davies (BCM, BScHons, Ph.D.) is a senior lecturer and academic research statistician based at the University of Otago, the oldest university in New Zealand. His research and published work relates to the development and application of statistical methods for the analysis of spatial phenomena, for which he received a prestigious Marsden Fund grant from the Royal Society of New Zealand. Dr Davies teaches statistics at all university levels, which inspired The Book of R.

Table of Contents

Preface
Acknowledgments
Introduction

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

PART II: PROGRAMMING
Chapter 9: Calling Functions
Chapter 10: Conditions and Loops
Chapter 11: Writing Functions
Chapter 12: Exceptions, Timings, and Visibility

PART III: STATISTICS AND PROBABILITY
Chapter 13: Elementary Statistics
Chapter 14: Basic Data Visualizations
Chapter 15: Probability
Chapter 16: Common Probability Distributions

PART IV: STATISTICAL TESTING AND MODELING
Chapter 17: Sampling Distributions and Confidence
Chapter 18: Hypothesis Testing
Chapter 19: Analysis of Variance
Chapter 20: Simple Linear Regression
Chapter 21: Multiple Linear Regression
Chapter 22: Linear Model Selection and Diagnostics

PART V: ADVANCED GRAPHICS
Chapter 23: Advanced Plot Customization
Chapter 24: Going Further with the Grammar of Graphics
Chapter 25: Defining Colors and Plotting in Higher Dimensions
Chapter 26: Interactive 3D Plots

Appendix A: Installing R and Contributed Packages
Appendix B: Working with RStudio
Reference List
From the B&N Reads Blog

Customer Reviews