Create the default message used when an object passed to an environment parameter does not have the correct class.
Usage
dis_msg_env(x, param = "call", call = rlang::caller_env())Arguments
- x
Required object; a parameter argument to test.
- param
Required character scalar; the parameter name. The default matches the argument named for environments used through
disputeR.- call
Required environment; the environment in which the function was called. If nesting
dis_msg_class()within another function, it is recommended to provide the calling environment to ensure the correct environment is referenced usingrlang::caller_env()(default). If there are multiple levels of nesting, thecallargument can be used to pass an environment created in the outermost function.
Details
See the vignette on vignette("developing", package = "disputeR")
for details about internal validation of arguments for this function. Unlike
the core functions, dis_param does not have a fact_check
argument. The vignette("developing", package = "disputeR") vignette
includes details on how to implement that functionality around dis_param.