Chapter 4. Fundamental Development Workflows
Having peeked under the hood of R packages and libraries in Chapter 3, here we provide the basic workflows for creating a package and moving it through the different states that come up during development.
Create a Package
Many packages are born out of one person’s frustration at some common task that should be easier. How should you decide whether something is package-worthy? There’s no definitive answer, but it’s helpful to appreciate at least two types of payoff:
- Product
-
Your life will be better when this functionality is implemented formally, in a package.
- Process
-
Greater mastery of R will make you more effective in your work.
Survey the Existing Landscape
If all you care about is the existence of a product, then your main goal is to navigate the space of existing packages. Silge, Nash, and Graves organized a survey and sessions around this at useR! 2017 and their write up for The R Journal provides a comprehensive roundup of resources.1
If you are looking for ways to increase your R mastery, you should still educate yourself about the landscape. But there are plenty of good reasons to make your own package, even if there is relevant prior work. The way experts got that way is by actually building things, often very basic things, and you deserve the same chance to learn by tinkering. If you’re only allowed to work on things that have never been touched, you’re likely looking at problems that are either very obscure or very ...
Get R Packages, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.