check_optional_nonneg_double_vector: Check optional non-negative double vector

View source: R/check.R

check_optional_nonneg_double_vectorR Documentation

Check optional non-negative double vector

Description

Check optional non-negative double vector

Usage

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

Arguments

x

Optional Numeric: Value to check. Must be NULL or a non-empty vector with all elements finite, greater than or equal to zero, and no NAs.

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_optional_nonneg_double_vector(NULL)
check_optional_nonneg_double_vector(c(0, 1, 5))
# Throw error:
try(check_optional_nonneg_double_vector(c(-1, 0)))

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