check_numeric: Check input numeric arguments for class and length.

View source: R/utils_checks.R

check_numericR Documentation

Check input numeric arguments for class and length.

Description

Check input numeric arguments for class and length.

Usage

check_numeric(
  ...,
  allow_null = FALSE,
  allowed_lengths = 1,
  list_allowed = FALSE,
  call = NULL
)

Arguments

...

Should be a single named argument, where the name is the variable name displayed in the error message. The value is the (supposed) logical.

allow_null

Logical indicating if NULL is allowed as input for the argument.

allowed_lengths

The allowed lengths of the argument.

list_allowed

Logical indicating if the argument is allowed to be a list. If TRUE each element will be checked.

call

Call to use for the call in the error message (used in rlang::abort). Default is rlang::caller_env() resulting in the function that called check_logical().

Value

Error if not numeric, NULL when not allowed, or too long/too short.


ggcorrheatmap documentation built on Aug. 25, 2025, 1:11 a.m.