This is designed to be used within functions to check the
status of the DISPUTER_FACT_CHECK environment variable as well
as the fact_check argument. Both are evaluated and the output
can be used to determine the execution path for the remainder of the
function.
Usage
dis_checker(fact_check, call = rlang::caller_env())Arguments
- fact_check
Required character scalar; one of either
"global"or"always", passed from the parent function'sfact_checkparameter.- call
Required environment; the environment in which the function was called. If
NULL(default), the function will attempt to determine the calling environment. If nesting functions, it is recommended to provide the calling environment to ensure the correct environment is referenced usingrlang::caller_env().
Value
Either TRUE if fact checking should be completed or FALSE
if it should be skipped. If the value of fact_check is not either
"global" or "always", an error will be returned.
Details
Since this function is meant to be used prior to most other checks,
internal validation of its arguments cannot be skipped. See the vignette on
vignette("developing", package = "disputeR") for details.