check_double_scalar: Check double scalar

View source: R/check.R

check_double_scalarR Documentation

Check double scalar

Description

Check double scalar

Usage

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

Arguments

x

Numeric: Value to check. Must be a single non-NA number (integer inputs are accepted).

arg_name

Character: Argument name to use in error messages.

Value

Called for side effects. Throws an error if checks fail.

Author(s)

EDG

Examples

check_double_scalar(3.14)
check_double_scalar(1L)
# Throw error:
try(check_double_scalar(NA_real_))
try(check_double_scalar(c(1.0, 2.0)))

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