check_scalar_logical: Check Scalar Logical

View source: R/check.R

check_scalar_logicalR Documentation

Check Scalar Logical

Description

Check Scalar Logical

Usage

check_scalar_logical(x, arg_name = deparse(substitute(x)))

Arguments

x

Logical: Value to check.

arg_name

Character: Argument name to use in error messages.

Value

Called for side effects.

Author(s)

EDG

Examples

check_scalar_logical(TRUE, "my_arg")
# Throw error:
try(check_scalar_logical(c(TRUE, FALSE), "my_arg"))
try(check_scalar_logical(NA, "my_arg"))

rtemis.core documentation built on Sept. 20, 2026, 9:06 a.m.