check_character: Check character

View source: R/check.R

check_characterR Documentation

Check character

Description

Check character

Usage

check_character(x, allow_null = TRUE, arg_name = deparse(substitute(x)))

Arguments

x

Vector to check.

allow_null

Logical: If TRUE, NULL values are allowed and return early.

arg_name

Character: Name of the variable for error messages.

Value

Called for side effects. Throws an error if check fails.

Author(s)

EDG

Examples

check_character("papaya")
# Throws error:
try(check_character(42L))

rtemis.core documentation built on April 22, 2026, 1:11 a.m.