February 10, 2022
Tests in R
Following the previous post about the package creation in R we are going to dive into some details about how to work with packages. The first thing of interest for us is the possibility to perform tests on the package’s contents in order to control the result. Such possibility greatly facilitates the workflow while creating a package and ensures its functionality.
What is testthat?
Focusing our attention on the devtools meta-package’s contents we encounter rather quickly a great number of tools to test packages.
One of the key element here is the testthat package, which has a number of functions to perform tests.
Among the advantages listed on the project’s official webpage we discover testthat is, as it: