Learn R Programming

checkmate (version 1.0)

assert: Combine multiple checks to an assertion

Description

Combine multiple checks to an 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

Run this code
x = 1:10
 assert(checkNull(x), checkInteger(x, any.missing = FALSE))

Run the code above in your browser using DataLab