stopif: Ensure that R expressions are false

Description Usage Arguments Value See Also Examples

Description

If any of the expressions in ... are not all FALSE, stop is called, producing an error message indicating the first of the elements of ... which were not false.

Usage

1

Arguments

...

Any number of (logical) R expressions, which should evaluate to TRUE.

Value

(NULL if all statements in ... are FALSE.)

See Also

stopifnot from package base.

Examples

1
2
3
4
5
## Not run: 
stopif(is.empty(c(2,1)), 4 < 3) # all FALSE
stopif(is.empty(numeric(0)))

## End(Not run)

bazar documentation built on May 2, 2019, 7:02 a.m.