Jump to ratings and reviews
Rate this book

R Packages: Organize, Test, Document, and Share Your Code

Rate this book
Turn your R code into packages that others can easily download and use. This practical book shows you how to bundle reusable R functions, sample data, and documentation together by applying author Hadley Wickhamâ??s package development philosophy. In the process, youâ??ll work with devtools, roxygen, and testthat, a set of R packages that automate common development tasks. Devtools encapsulates best practices that Hadley has learned from years of working with this programming language. Ideal for developers, data scientists, and programmers with various backgrounds, this book starts you with the basics and shows you how to improve your package writing over time. Youâ??ll learn to focus on what you want your package to do, rather than think about package structure.

202 pages, Paperback

First published March 26, 2015

33 people are currently reading
174 people want to read

About the author

Hadley Wickham

19 books184 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
92 (53%)
4 stars
63 (36%)
3 stars
14 (8%)
2 stars
1 (<1%)
1 star
1 (<1%)
Displaying 1 - 17 of 17 reviews
Profile Image for Saptarishi Pandey.
8 reviews
January 12, 2025
Built my first R package at work using this book! Still need to come back to it for learning more about CI/CD and automated testing. Didn't have much use-case for that in my package.

This book is the one-stop-solution for anyone trying to learn about how to build R packages using RStudio, ROxygen, devtools, and usethis! Use it like a referential textbook and go back to it as you build your own package.
31 reviews1 follower
July 4, 2017
Excellent book for beginners and advanced useRs alike; gives great background on writing packages in R and the CRAN submission process.

Although the print version is slightly out-of-date, Hadley Wickham has the book available to read online free of charge (legally) and completely up-to-date.
5 reviews1 follower
January 13, 2022
I used to be terrified of writing R packages, but it is actually really simple using the step-by-step instructions in this book. Highly recommended for anyone looking to share their R code through a package.
Profile Image for Huong.
158 reviews4 followers
March 8, 2018
Great source for beginners to have a fast and steady start.
Profile Image for Ferhat Culfaz.
272 reviews18 followers
March 7, 2019
Superbly written in a nice and simple way. An essential read for any Reason user who wants to share code with their peers in open source or within their organisation.
Profile Image for JDK1962.
1,447 reviews20 followers
August 31, 2016
Excellent. All hail the Wickham. Used this as a resource as I was trying to re-implement an existing hand-tooled package that I wrote a few years ago with nothing more than a text editor. Now I'm using RStudio, devtools, Git and GitHub, Roxygen2, clearing all the checks with not even notes, and I'm feeling much better about being able to confidently enhance the package going forward.

There were a few issues that kept me from going to five stars (mainly around when you follow the instructions, and things don't work), but overall, if you're building packages, this is pretty indispensable.
7 reviews
May 19, 2015
Very good and thorough introduction to creating packages in R. Hadley de-mystifies R and makes it very easy to set up your first package on your computer. Since creating a package is so simple with this book and RStudio, getting a package on CRAN is more complicated than I had envisioned. But he is one of the best people to guide you through the process.
Profile Image for Sumit.
65 reviews8 followers
August 18, 2016
A comprehensive book on creating your own packages in R. Since it gives a good understanding of the internals of R packages, it is a book worth reading, even if you do not plan to build an R packages soon.
18 reviews3 followers
April 19, 2015
Clear outline of how to create packages. If you need to create a package, do so with this book open.
13 reviews1 follower
July 11, 2016
Thorough and excellent description of how to create an R package to submit to CRAN. Highly recommended to all R users.
Displaying 1 - 17 of 17 reviews

Can't find what you're looking for?

Get help and learn more about the design.