Learn R Programming

calendar (version 0.2.0)

assert: Assert truthfulness of conditions before evaluation

Description

This function is a wrapper of stopifnot(), tryCatch() and cli::cli_abort() and asserts the truthfulness of the passed expression(s).

Usage

assert(..., error_message = NULL)

Value

NULL if all statements in ... are TRUE

Arguments

...

expressions >= 1. If named the names are used as error messages, otherwise R's internal error-messages are thrown

error_message

character. An error message, supports formatting with the cli package.

See Also