The best introductory books for programming and data science with R

Why am I passionate about this?

I’m an applied statistician and academic researcher/lecturer at New Zealand’s oldest university – the University of Otago. R facilitates everything I do – research, academic publication, and teaching. It’s the latter part of my job that motivated my own book on R. From first-year statistics students who have never seen R to my own Ph.D. students using R to implement novel and highly complex statistical methods and models, my experience is that all ultimately love the ease with which the R language permits exploration, visualisation, analysis, and inference of one’s data. The ever-growing need in today’s society for skilled statisticians and data scientists means there's never been a better time to learn this essential language.


I wrote...

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

By Tilman M. Davies,

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

What is my book about?

The Book of R is a comprehensive, beginner-friendly guide to R, the world’s most popular programming language for statistical analysis. Even if you have no programming experience and little more than a grounding in the basics of mathematics, you’ll find everything you need to begin using R effectively for 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 and performing statistical tests and modelling. You’ll even learn how to create impressive data visualisations with R’s basic graphics tools and contributed packages, like ggplot2 and ggvis, as well as interactive 3D visualisations using the rgl package.
Shepherd is reader supported. When you buy books, we may earn an affiliate commission.

The books I picked & why

Book cover of R in Action: Data Analysis and Graphics with R

Tilman M. Davies Why did I love this book?

This provides a superb balance between technical aspects of R coding and the statistical methods that motivate its use. It's rare to find a book on topics like this that are written with Kabacoff's easygoing yet precise style, which makes it ideal for beginners. From my own experience, it is obvious the author has spent many years teaching this type of content, knowing where things deserve extra explanation up front and where other more technical details can be relegated to more advanced texts.

By Robert I. Kabacoff,

Why should I read it?

1 author picked R in Action as one of their favorite books, and they share why you should read it.

What is this book about?

DESCRIPTION

R is a powerful language for statistical computing and graphics that can handle virtually any data-crunching task. It runs on all important platforms and provides thousands of useful specialized modules and utilities. This makes R a great way to get meaningful information from mountains of raw data.



R in Action, Second Edition is language tutorial focused on practical problems. Written by a research methodologist, it takes a direct and modular approach to quickly give readers the information they need to produce useful results. Focusing on realistic data analyses and a comprehensive integration of graphics, it follows the steps that…


Book cover of The R Book

Tilman M. Davies Why did I love this book?

An authoritative tome on R. This book is the ultimate reference guide, heavy on statistical methods from the simple to the advanced. Of the 29 chapters, only the first five chapters or so have R syntactical and programming skills as their main focus; the remaining content highlights the many and varied statistical techniques R is capable of. I think this is a fantastic book to have on the shelf for people who are likely to need R and its contributed packages for a variety of different statistical analyses, but might not know where to initially start for any given statistical method.

By Michael J. Crawley,

Why should I read it?

1 author picked The R Book as one of their favorite books, and they share why you should read it.

What is this book about?

Hugely successful and popular text presenting an extensive and comprehensive guide for all R users The R language is recognized as one of the most powerful and flexible statistical software packages, enabling users to apply many statistical techniques that would be impossible without such software to help implement such large data sets. R has become an essential tool for understanding and carrying out research. This edition: * Features full colour text and extensive graphics throughout. * Introduces a clear structure with numbered section headings to help readers locate information more efficiently. * Looks at the evolution of R over the…


Book cover of R For Dummies

Tilman M. Davies Why did I love this book?

A gentle yet detailed book for beginner programmers. A great book for those who know they'll be getting up to some programming in R but who are very new to programming in general. The book's chapters are filled with content on the syntax, usage, and 'best practice' guidelines. The examples guide the reader in a step-by-step fashion to maximise understanding. An especially unique chapter providing examples on things you can do in R that you might've otherwise done in Excel is one of its stand-out features.

By Andrie De Vries, Joris Meys,

Why should I read it?

1 author picked R For Dummies as one of their favorite books, and they share why you should read it.

What is this book about?

Mastering R has never been easier Picking up R can be tough, even for seasoned statisticians and data analysts. R For Dummies, 2nd Edition provides a quick and painless way to master all the R you'll ever need. Requiring no prior programming experience and packed with tons of practical examples, step-by-step exercises, and sample code, this friendly and accessible guide shows you how to know your way around lists, data frames, and other R data structures, while learning to interact with other programs, such as Microsoft Excel. You'll learn how to reshape and manipulate data, merge data sets, split and…


Book cover of A First Course in Statistical Programming with R

Tilman M. Davies Why did I love this book?

From well-known authorities in the R-sphere (including a former R Core Team member), this is a long-standing text whose first edition was one of the early books intended to teach R to beginners. It provides concise instructions and examples on how R is used as a programming language before focusing on 'number-crunching' statistical methods that are typically seen as computationally intensive. One of the notable features of this book is the statistical methods at hand are not just illustrated using 'black-box' code--the reader is provided with the necessary mathematical detail to understand what's going on behind the scenes for those that are so inclined.

By W. John Braun, Duncan J. Murdoch,

Why should I read it?

1 author picked A First Course in Statistical Programming with R as one of their favorite books, and they share why you should read it.

What is this book about?

This third edition of Braun and Murdoch's bestselling textbook now includes discussion of the use and design principles of the tidyverse packages in R, including expanded coverage of ggplot2, and R Markdown. The expanded simulation chapter introduces the Box-Muller and Metropolis-Hastings algorithms. New examples and exercises have been added throughout. This is the only introduction you'll need to start programming in R, the computing standard for analyzing data. This book comes with real R code that teaches the standards of the language. Unlike other introductory books on the R system, this book emphasizes portable programming skills that apply to most…


Book cover of R for Data Science: Import, Tidy, Transform, Visualize, and Model Data

Tilman M. Davies Why did I love this book?

For those intending to use R with an eye on the popular 'Tidyverse' suite of packages – which facilitate the handling, manipulation, and visualisation of data setsit's hard to go past this book. From the founding contributors of the RStudio/Tidyverse worlds, this is a great way to learn about this dialect of R against the overarching backdrop of statistical data analysis and data science.

By Hadley Wickham, Garrett Grolemund,

Why should I read it?

1 author picked R for Data Science as one of their favorite books, and they share why you should read it.

What is this book about?

Learn how to use R to turn raw data into insight, knowledge, and understanding. This book introduces you to R, RStudio, and the tidyverse, a collection of R packages designed to work together to make data science fast, fluent, and fun. Suitable for readers with no previous programming experience, R for Data Science is designed to get you doing data science as quickly as possible. Authors Hadley Wickham and Garrett Grolemund guide you through the steps of importing, wrangling, exploring, and modeling your data and communicating the results. You'll get a complete, big-picture understanding of the data science cycle, along…


5 book lists we think you will like!

Interested in statistics, data processing, and data science?

10,000+ authors have recommended their favorite books and what they love about them. Browse their picks for the best books about statistics, data processing, and data science.

Statistics Explore 27 books about statistics
Data Processing Explore 25 books about data processing
Data Science Explore 24 books about data science