assert() is a drop-in replacement for
supporting more informative error messages.
assert(..., msg = NULL)
Any number of R expressions that return
logical(1), each of
which should evaluate to
TRUE. Rather than combining expressions with
&&, separate them by commas so that better error messages can be
Custom message to return.
TRUE on success, error on failure.
If any of the expressions defined in
... are not
stop is called, producing an error message indicating the
first expression which was not