In this workshop, we discuss how to get started with unit testing in R, which is formal automated testing of functions within packages. We’ll demonstrate handy functions in `usethis` and `devtools`, strategies for writing tests, debugging techniques, and broad concepts in function writing that facilitate a smoother testing process.
This workshop will pick up exactly where we left our little `ralph` (aka R-Ladies Philly) package one year ago with “Your first R package in 1 hour: Tools that make R package development easy” (https://www.pipinghotdata.com/talks/2020-10-25-your-first-r-package-in-1-hour/). Participants will get the most out of this workshop if they review those materials in advance, or if they are already familiar with building R packages with `devtools` and `usethis`.
Materials for the workshop are available here: https://github.com/shannonpileggi/ralphGetsTested
Please install, or update, the following packages in advance of the workshop: usethis, devtools, testthat, covr, DT, broom, glue, dplyr, purrr, magrittr, and rlang (or tidyverse).
Presenters:
Shannon Pileggi
Gordon Shotwell