assert: Assert truthfulness of conditions before evaluation

View source: R/utils.R

assertR Documentation

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)

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.

Value

NULL if all statements in ... are TRUE

See Also

stopifnot(), cli::cli_abort(), tryCatch()


ATFutures/ical documentation built on Aug. 22, 2024, 6:39 a.m.