install.packages('pak')
pak::pak(c('plumber', 'pins', 'vetiver', 'lobstr', 'shiny', 'bslib', 'bsicons',
'fs', 'ggplot2', 'dplyr', 'tidyr', 'httr2', 'constructive'))Preface
All of the labs for the do4ds book are available in the GitHub repo:
https://github.com/akgold/do4ds.
Below are some of the packages you’ll need to complete the labs (and others I’ve included for a better understanding of project, objects, structures, etc.)
Why publish a lab solution manual?
Working through the lab solutions in each chapter did, in fact, give me a better understanding of ‘DevOps conventions, tools, and practices’ and made me ‘work better with the IT/Admin team at your organization’.1
More importantly, this online version of solutions provides examples of what each chapter looks like in my organization. Working through the labs (i.e., getting the code to run in R and Python) and creating diagrams/summaries made the topics more concrete and applicable.
Why not just use LLMs to find the answers?
LLMs aren’t covered in do4ds, but the release of ChatGPT at the end of 2022 marked the beginning of a (potential) major change in how data science code and projects are developed. The initial LLMs weren’t great at writing code. Still, they have improved significantly,2 and by the end of 2025 (the approximate date I started publishing my lab solutions), the R/Python ecosystem had produced a variety of packages and tools for using LLMs.3
I’ve found that using LLMs to supplement learning any topic makes the information stick more than just asking for an answer. For example, I’d use the code in each lab as a starting point and develop a solution until I ran into a bug or issue. Then, I’d check my understanding with the LLM and confirm Claude’s responses with source documentation. This iterative process made me recall and use the topics in my daily work as a Posit System Administrator.
I’ve found using Claude is very helpful in expanding on topics, building mermaid diagrams, and generating ideas for troubleshooting bugs/errors. I don’t ask for direct solutions to problems or to provide answers to comprehension questions because I’ve found this doesn’t stretch my ability to formulate my own answers (or recall the information later).4
Color palette
The color palette (‘just waiting for aliens’) comes from color-hex.5
| Color | Color Hex | RGB |
|---|---|---|
| Black | #00120b | (0,18,11) |
| Dark Green/Gray | #35605a | (53,96,90) |
| Dark Gray | #6b818c | (107,129,140) |
| Light Green/Gray | #d8e4ff | (216,228,255) |
| Green | #31e981 | (49,233,129) |
These are direct quotes from book’s intro.↩︎
Anthropic’s Claude model (released in March 2023) was the first LLM I used that had a notable increased ability to answer R and Python coding questions.↩︎
Check out the Posit AI blog or Luis D. Verde Arregoitia’s book, Large Language Model tools for R.↩︎
This is consistent with recent research on using LLMs in educational settings.↩︎