Skip to main content



R For Dummies, 2nd Edition

Andrie de Vries, Joris Meys

ISBN: 978-1-119-05580-8 July 2015 432 Pages


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 combine data, perform calculations on vectors and arrays, and so much more.

R is an open source statistical environment and programming language that has become very popular in varied fields for the management and analysis of data. R provides a wide array of statistical and graphical techniques, and has become the standard among statisticians for software development and data analysis. R For Dummies, 2nd Edition takes the intimidation out of working with R and arms you with the knowledge and know-how to master the programming language of choice among statisticians and data analysts worldwide.

  • Covers downloading, installing, and configuring R
  • Includes tips for getting data in and out of R
  • Offers advice on fitting regression models and ANOVA
  • Provides helpful hints for working with graphics

R For Dummies, 2nd Edition is an ideal introduction to R for complete beginners, as well as an excellent technical reference for experienced R programmers.

Introduction 1

Part I: Getting Started with R Programming 9

Chapter 1: Introducing R: The Big Picture 11

Chapter 2: Exploring R 19

Chapter 3: The Fundamentals of R 35

Part II: Getting Down to Work in R 49

Chapter 4: Getting Started with Arithmetic 51

Chapter 5: Getting Started with Reading and Writing 79

Chapter 6: Going on a Date with R 103

Chapter 7: Working in More Dimensions 113

Part III: Coding in R 149

Chapter 8: Putting the Fun in Functions 151

Chapter 9: Controlling the Logical Flow 171

Chapter 10: Debugging Your Code 193

Chapter 11: Getting Help 209

Part IV: Making the Data Talk 219

Chapter 12: Getting Data into and out of R 221

Chapter 13: Manipulating and Processing Data 239

Chapter 14: Summarizing Data 275

Chapter 15: Testing Differences and Relations 299

Part V: Working with Graphics 325

Chapter 16: Using Base Graphics 327

Chapter 17: Creating Faceted Graphics with Lattice 343

Chapter 18: Looking At ggplot 2 Graphics 361

Part VI: The Part of Tens 375

Chapter 19: Ten Things You Can Do in R That You Would’ve Done in Microsoft Excel 377

Chapter 20: Ten Tips on Working with Packages 387

Appendix A: Installing R and RStudio 395

Appendix B: The r fordummies Package 401

Index 403