Ad Hoc Testing

TL;DR testthat provides a convenient and easy to use unit test framework for R. While traditionally used as a formal part of package development, it can also be used interactively. Ad hoc test suites can be run as functions within an R session to quickly test the impact of code changes. I use this workflow when writing parsing functions for HTML data. Introduction Like all Hadley Wickham creations, testthat is a wonderful tool that generally improves the lives of R users.