Chapter 1. Introduction
This chapter describes the wide range of people this book was written for, in terms of R and programming experience, and how you can get the most out of it. Anyone setting out to improve efficiency should have an understanding of precisely what they mean by the term, and this is discussed with reference to algorithmic and programmer efficiency in “What Is Efficiency?”, and with reference to R in particular in “What Is Efficient R Programming?” on the same page. It may seem obvious, but it’s also worth thinking about why anyone would bother with efficient code now that powerful computers are cheap and accessible. This is covered in “Why Efficiency?”.
This book happily is not completely R-specific. Non R–programming skills that are needed for efficient R programming, which you will develop during the course of following this book, are covered in “Cross-Transferable Skills for Efficiency”. Atypically for a book about programming, this section introduces touch typing and consistency, cross-transferable skills that should improve your efficiency beyond programming. However, this is first and foremost a book about programming and it wouldn’t be so without code examples in every chapter. Despite being more conceptual and discursive, this opening chapter is no exception: its penultimate section (“Benchmarking and Profiling”) describes two essential tools in the efficient R programmer’s toolbox and how to use them with a couple of illustrative examples. The final ...