assert: Asserts an expression

Description Usage Arguments Examples

Description

If the expression evaluates to false then the execution stops and the given message is printed.

Usage

1
assert(expr, msg)

Arguments

expr

The expression to evaluate.

msg

The error message.

Examples

1
2
3
4
## Not run: 
assert(1 == 2, '1 is not equal to 2')

## End(Not run)

betabandido/exptools documentation built on May 12, 2019, 7:25 p.m.