Author new functions that warns and provides a custom message when a predicate evaluates to true.

flag_ff(predicate, warn_message, arguments, ...)

Arguments

predicate

Evaluating function.

warn_message

Message to receive with the predicate evaluates to true.

arguments

(option) character vector of arguments for the new function. If missing, the new function will not have any arguments. Arguments in the predicate should also be considered. For example, if the predicate is "is.logical(x)", the arguments value should be "x".

...

Additional arguments passed to the base warning function

Value

Assigned function

See also