chk_null_or {chk}R Documentation

Check NULL Or

Description

Checks if NULL or passes test.

Usage

chk_null_or(x, chk, ..., vld, x_name = NULL)

Arguments

x

The object to check.

chk

A chk function. Soft-deprecated for vld. [Deprecated]

...

Arguments passed to chk.

vld

A vld function.

x_name

A string of the name of object x or NULL.

Value

An informative error if the test fails.

Examples

chk_null_or(NULL, chk_number)
chk_null_or(1, chk_number)
try(chk_null_or("1", chk_number))

[Package chk version 0.9.1 Index]