Preface

Welcome to the 2nd edition of R Packages! If you’re familiar with the 1st edition, this preface describes the major changes so that you can focus your reading on the new areas.

There are X main goals for this edition:

  • Update to reflect changes in the devtools package, specifically, its “conscious uncoupling” into a set of smaller, more focused packages.

  • Expanded coverage of workflow and process, alongside the presentation of all the important moving parts that make up an R package.

  • more to come

Specifics about individual chapters:

  • New chapter 2, “The Whole Game”, previews key steps in the package development process.

  • New chapter 3, “Setup”, has been carved out of the previous Introduction and gained more detail.

  • The sections “Organising your functions” and “Code style”, from Chapter 6, “R code”, have been removed, in favor of an online style guide, https://style.tidyverse.org/. The style guide is paired with the new styler package (Müller and Walthert 2018) which can automatically apply many of the rules.

  • The chapter formerly known as “Package structure” has been expanded and split into two chapters, one covering package structure and state (Chapter 4) and another on workflows and tooling (Chapter 5).

  • something about git/github

References

Müller, Kirill, and Lorenz Walthert. 2018. Styler: Non-Invasive Pretty Printing of R Code. http://styler.r-lib.org.