R Packages

R PackagesR Packages: Organize, test, document and share your code

Hadley Wickham (2015)

O’Reilly Media, 201 pp., ISBN 978-1-491-91059-7

 

 

[2015-05-04] I finished reading this book last night. Already a week or so ago, this book had already become my obligatory go-to reference for package-related information. Orders of magnitude better than earlier documentation, because it is self-contained, up-to-date, and with clear explanations of the reasons behind what the author considers good practice. I have been using RStudio, roxygen2, and knitr  in the development of the r4photobiology suite of packages since early stages (nearly two years ago), and googled for information and read many of the other disperse sources of information. I still had several issues with the packages that I had been unable to solve, or for which I had used inelegant work-arounds. As you will gather from the latest versions of packages photobiology and photobiologygg, most of the bigger issues are now resolved thanks to the advice in the book. There several that affect mainly code maintenance that will be fixed in future releases of the packages.

The book is well organized and avoids arcane features, making it accessible to first-time package developers while having still a lot of interest for experienced R developers new to roxygen2 or RStudio. It takes the reader from the basics of setting up an RStudio project for developing packages to the details of submitting a package to CRAN.

The book is very clearly written, and noticed only one typing mistake. Hadley Wickham with the support from the on-line R community has produced a book that will allow many ordinary R users to keep their code in packages and eventually share it. However, be aware that this book deals exclusively with package writing, it assumes that you already know how to write programs in R.

Nicely typeset using RMarkdown, and also available on-line as an HTML site built from the same source files. I have bought the eBook and read the PDF on a tablet, with is handy as it can be searched.

Rating: 5/5

Leave a Reply

Your email address will not be published. Required fields are marked *