Session 8: unit tests

Learn how to run tests on your R code.

Thomas Pronk https://thomaspronk.com/ (Amsterdam UMC)https://www.amsterdamumc.org/en.htm
11-20-2024

Thomas maintains an R package called splithalfr, which features some bespoke resampling methods (Pronk et al., 2021). To make sure everything in the package works correctly, he’s written a few unit tests. In this RUM-UMC session, Thomas will give a beginner-friendly introduction to unit testing in R, illustrated by the splithalfr package. Following that, we will briefly dip our toes into test automation via testthat

Material

The material for the session is available here.