Incorporate more argument checking into packages
Closed this issue · 1 comments
spencerpease commented
Overview
A lot of the code we write makes assumptions about the type of data we get from function parameters. We do basic parameter validation ourselves, but exhaustive parameter validation requires a lot of code that must be repeated everywhere.
Potential Solution
We should adopt an R package that make these checks easier by providing a wider set of tests and the ability to create our own. Two packages I've found are assertthat and checkmate. Both of these packages have small dependency footprints and would add a lot of functionality to our projects. We could either import them to our existing packages, or reexport a subset of these functions from MazamaCoreUtils.
jonathancallahan commented
The checkmate package looks amazing! We should definitely use it.