chkor_vld: Chk OR

View source: R/chkor-vld.R

chkor_vldR Documentation

Chk OR

Description

Chk OR

Usage

chkor_vld(..., x_name = NULL)

Arguments

...

Multiple vld_ calls.

A common mistake is to pass chk_ calls.

chkor_vld() is relatively slow. If at all possible use chk_null_or() or first test using the individual vld_ functions and then call chkor_vld() to generate an informative error message.

x_name

A string of the name of the object to use in the error message or NULL. If a string it is passed to each of the chk_ calls so that the error message refers to x_name rather than the deparsed vld_ arguments.

Value

An informative error if the test fails.

See Also

chk_null_or()

Examples

chkor_vld()
chkor_vld(vld_flag(TRUE))
try(chkor_vld(vld_flag(1)))
try(chkor_vld(vld_flag(1), vld_flag(2)))
chkor_vld(vld_flag(1), vld_flag(TRUE))
try(chkor_vld(vld_flag(1), vld_number(1), x_name = "`arg`"))

chk documentation built on Sept. 3, 2026, 9:07 a.m.