assert {checkmate}R Documentation

Combine multiple checks into one assertion

Description

Combine multiple checks into one assertion

Usage

assert(..., .var.name)

Arguments

...

[ANY]
List of calls to check functions.

.var.name

[character(1)]
Name of object to check. Defaults to a heuristic to determine the name of the first argument of the first call.

Value

Throws an error if all checks fails and invisibly returns TRUE otherwise.

Examples

x = 1:10
assert(checkNull(x), checkInteger(x, any.missing = FALSE))
## Not run: 
x = 1
assert(checkChoice(x, c("a", "b")), checkDataFrame(x))

## End(Not run)

[Package checkmate version 1.3 Index]