check_consistent: Check function parameters conform to a set of rules
Description
If the parameters of a function are given in some combination but have
an interdependency (e.g. different parametrisations of a probability
distribution) or a constraint (like x>0) this function can simultaneously
check all interrelations are satisfied and report on all the not
conformant features of the parameters.
Usage
check_consistent(..., .env = rlang::caller_env())
Value
nothing, throws an informative error if the checks fail.
Arguments
...
a set of rules to check either as x=y+z, or x>y. Single =
assignment is checked for equality using identical otherwise the
expressions are evaluated and checked they all are true. This for
consistency with resolve_missing() which only uses assignment, and ignores
logical expressions.