Book description
Turn your R code into packages that others can easily install and use. With this fully updated edition, developers and data scientists will learn how to bundle reusable R functions, sample data, and documentation together by applying the package development philosophy used by the team that maintains the "tidyverse" suite of packages. In the process, you'll learn how to automate common development tasks using a set of R packages, including devtools, usethis, testthat, and roxygen2.
Authors Hadley Wickham and Jennifer Bryan from Posit (formerly known as RStudio) help you create packages quickly, then teach you how to get better over time. You'll be able to focus on what you want your package to do as you progressively develop greater mastery of the structure of a package.
With this book, you will:
- Learn the key components of an R package, including code, documentation, and tests
- Streamline your development process with devtools and the RStudio IDE
- Get tips on effective habits such as organizing functions into files
- Get caught up on important new features in the devtools ecosystem
- Learn about the art and science of unit testing, using features in the third edition of testthat
- Turn your existing documentation into a beautiful and user friendly website with pkgdown
- Gain an appreciation of the benefits of modern code hosting platforms, such as GitHub
Publisher resources
Table of contents
- Preface
-
I. Getting Started
-
1. The Whole Game
- Load devtools and Friends
- Toy Package: regexcite
- Preview the Finished Product
- create_package()
- use_git()
- Write the First Function
- use_r()
- load_all()
- check()
- Edit DESCRIPTION
- use_mit_license()
- document()
- check() Again
- install()
- use_testthat()
- use_package()
- use_github()
- use_readme_rmd()
- The End: check() and install()
- Review
- 2. System Setup
- 3. Package Structure and State
- 4. Fundamental Development Workflows
- 5. The Package Within
-
1. The Whole Game
- II. Package Components
-
III. Package Metadata
- 9. DESCRIPTION
- 10. Dependencies: Mindset and Background
- 11. Dependencies: In Practice
- 12. Licensing
- IV. Testing
- V. Documentation
-
VI. Maintenance and Distribution
- 20. Software Development Practices
- 21. Lifecycle
- 22. Releasing to CRAN
- Index
- About the Authors
Product information
- Title: R Packages, 2nd Edition
- Author(s):
- Release date: June 2023
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781098134945
You might also like
book
R Packages
Turn your R code into packages that others can easily download and use. This practical book …
book
R Cookbook, 2nd Edition
Perform data analysis with R quickly and efficiently with more than 275 practical recipes in this …
book
R in a Nutshell, 2nd Edition
If you’re considering R for statistical computing and data visualization, this book provides a quick and …
book
Data Wrangling with R
Take your data wrangling skills to the next level by gaining a deep understanding of tidyverse …