Learn R Programming

chk (version 0.9.2)

chk_null_or: Check NULL Or

Description

Checks if NULL or passes test.

Usage

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

Value

An informative error if the test fails.

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.

Examples

Run this code
chk_null_or(NULL, chk_number)
chk_null_or(1, chk_number)
try(chk_null_or("1", chk_number))

Run the code above in your browser using DataLab