massert {redcapAPI} | R Documentation |
Conduct Multiple Assertions
Description
This documentation attempts to describe arguments to make assertions
on arguments. In order to prevent confusion, it is imperative to develop some
terminology up front. We will use function argument to refer to an argument
of the function for which we are conducting assertions. We will use
assertion argument to refer to arguments to pass to the assertion function
being applied to a function argument. Lastly, we will use massert argument
to refer to arguments to massert
Usage
massert(formula, fun, ..., fixed = list())
Arguments
formula |
A one sided formula naming the arguments on which the assertion will be performed. |
fun |
An assertion function to perform. |
... |
Additional lists. Each argument provided is a named list of |
fixed |
A named list of arguments that are fixed across all assertions. |
Details
Only one assert function may be utilized in each call to massert
.
This allows for all numeric variables to be checked in one call, all logical
variables to be checked in a subsequent call, etc.