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.
Learn about the most useful components of an R package, including vignettes and unit tests
Automate anything you can, taking advantage of the years of development experience embodied in devtools
Get tips on good style, such as organizing functions into files
Streamline your development process with devtools
Learn the best way to submit your package to the Comprehensive R Archive Network (CRAN)
Learn from a well-respected member of the R community who created 30 R packages, including ggplot2, dplyr, and tidyr
Hadley Wickham is an Assistant Professor and the Dobelman FamilyJunior Chair in Statistics at Rice University. He is an active memberof the R community, has written and contributed to over 30 R packages, and won the John Chambers Award for Statistical Computing for his work developing tools for data reshaping and visualization. His research focuses on how to make data analysis better, faster and easier, with a particular emphasis on the use of visualization to better understand data and models.
The animal on the cover of R Packages is a kaka, or nestor parrot (Nestor meridionalis), found in native forests of New Zealand. Generally heard before they are seen, kaka are very gregarious and move in large flocks.
Kaka are obligate forest birds that obtain all their food from trees. They are adept fliers, capable of weaving through trunks and branches, and can cover long distances, including over water. They consume seeds, fruit, nectar, sap, honeydew, and tree-dwelling invertebrates.
Although forest clearance has destroyed all but a fraction of the kaka‚Äôs former habitat, the biggest threat to their survival is introduced mammalian predators, particularly the stoat, but also the brush-tailed possum.
Many of the animals on O'Reilly covers are endangered; all of them are important to the world. To learn more about how you can help, go to animals.oreilly.com.
The cover image is from Wood's Animate Creation. The cover fonts are URW Typewriter and Guardian Sans. The text font is Adobe Minion Pro; the heading font is Adobe Myriad Condensed; and the code font is Dalton Maag's Ubuntu Mono.