checkNull {checkmate}R Documentation

Check if an argument is NULL

Description

Check if an argument is NULL

Usage

checkNull(x)

assertNull(x, .var.name)

testNull(x)

Arguments

x

[any]
Object to check.

.var.name

[character(1)]
Name for x. Defaults to a heuristic to determine the name using deparse and substitute.

Value

Depending on the function prefix: If the check is successful, all functions return TRUE. If the check is not successful, assertNull throws an error message, testNull returns FALSE and checkNull returns a string with the error message.

Examples

testNull(NULL)
testNull(1)

[Package checkmate version 1.6.0 Index]