📖 Overview
R Packages demystifies the process of creating and maintaining R packages for statistical computing and data science. The book covers package development from start to finish, including writing code, adding documentation, and submitting to CRAN.
The content progresses through key package components like function organization, testing frameworks, and version control using Git and GitHub. Each chapter provides practical examples and code snippets that demonstrate core concepts in action, with an emphasis on best practices and efficient workflows.
The technical aspects of R package development are balanced with guidance on the social elements of sharing code within the R community. Topics include package licensing, collaboration strategies, and maintaining packages over time.
This guide serves as both a reference manual and a broader exploration of software development principles in the R ecosystem. The text emphasizes reproducible research and code organization techniques that extend beyond package creation into general programming practices.
👀 Reviews
Readers consistently point to this book as their go-to reference for R package development. The clear, step-by-step instructions and practical examples help developers go from basic package creation to CRAN submission.
Likes:
- Logical organization and workflow
- Concrete examples and code snippets
- Coverage of documentation, testing, and CRAN requirements
- Free online version stays updated
Dislikes:
- Some sections need more depth (especially C++ integration)
- Print version becomes outdated quickly
- Limited coverage of complex dependency management
- More advanced topics glossed over
One reader noted: "Got me from zero to published package in under a week." Another mentioned: "The sections on roxygen2 and testing saved me hours of frustration."
Ratings:
Goodreads: 4.4/5 (156 ratings)
Amazon: 4.7/5 (52 reviews)
O'Reilly: 4.5/5 (23 reviews)
Most negative reviews focus on the book's basic approach, with advanced developers wanting more complex use cases and troubleshooting guidance.
📚 Similar books
Advanced R by Hadley Wickham
This book explores R's deeper programming concepts and internal workings for developers who want to move beyond writing functions.
Mastering Software Development in R by Roger Peng, Sean Kross, and Brooke Anderson The text covers R package development, documentation, testing, and the complete software development life cycle from a statistical programming perspective.
Python Packages by Tomas Beuzen and Tiffany Timbers The book presents Python package development principles, from project structure to publication on PyPI, mirroring the comprehensive approach of R Packages.
The Art of R Programming by Norman Matloff The book teaches programming techniques and package organization principles through practical examples of mathematical operations and statistical computing.
Software Engineering with R by Richard Cotton This guide demonstrates professional software engineering practices for R development, including version control, testing frameworks, and continuous integration.
Mastering Software Development in R by Roger Peng, Sean Kross, and Brooke Anderson The text covers R package development, documentation, testing, and the complete software development life cycle from a statistical programming perspective.
Python Packages by Tomas Beuzen and Tiffany Timbers The book presents Python package development principles, from project structure to publication on PyPI, mirroring the comprehensive approach of R Packages.
The Art of R Programming by Norman Matloff The book teaches programming techniques and package organization principles through practical examples of mathematical operations and statistical computing.
Software Engineering with R by Richard Cotton This guide demonstrates professional software engineering practices for R development, including version control, testing frameworks, and continuous integration.
🤔 Interesting facts
🔸 R Packages has become a cornerstone resource in the R programming community, with its first edition published in 2015 and a second edition released in 2023, reflecting the rapid evolution of R package development.
📦 The author, Hadley Wickham, created many of R's most popular packages, including ggplot2, which revolutionized data visualization in R and is used in over 25% of R packages on CRAN.
🌐 The book is freely available online at r-pkgs.org, embodying the open-source philosophy that has made R such a successful programming language.
🔗 The development of R packages discussed in the book builds upon the tidyverse ecosystem, a collection of R packages that share common design philosophies and data structures, which Wickham himself pioneered.
💡 The principles taught in the book have influenced over 19,000 packages currently available on CRAN (Comprehensive R Archive Network), making it one of the largest repositories of statistical computing tools in the world.