Preface

R is a powerful tool for statistics, graphics, and statistical programming. It is used by tens of thousands of people daily to perform serious statistical analyses. It is a free, open source system whose implementation is the collective accomplishment of many intelligent, hard-working people. There are more than 2,000 available add-ons, and R is a serious rival to all commercial statistical packages.

But R can be frustrating. It’s not obvious how to accomplish many tasks, even simple ones. The simple tasks are easy once you know how, yet figuring out the “how” can be maddening.

This is a book of how-to recipes for beginners, each of which solves a specific problem. The recipe includes a quick introduction to the solution, followed by a discussion that aims to unpack the solution and give you some insight into how it works. I know these recipes are useful and I know they work because I use them myself.

Most recipes use one or two R functions to solve the stated problem. It’s important to remember that I do not describe the functions in detail; rather, I describe just enough to get the job done. Nearly every such function has additional capabilities beyond those described here, and some of those capabilities are amazing. I strongly urge you to read the function’s help page. You will likely learn something valuable.

The book is not a tutorial on R, although you will learn something by studying the recipes. The book is not an introduction to statistics, either. The recipes assume ...

Get 25 Recipes for Getting Started with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.