check_numeric: Check that a specific list element is a numeric value

Description Usage Arguments

View source: R/utils_validation.R

Description

Check that a specific list element is a numeric value

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
check_numeric(
  obj,
  attr,
  err_h,
  min_val = NULL,
  max_val = Inf,
  allow_na = FALSE,
  allow_null = FALSE,
  allow_inf = FALSE
)

Arguments

obj

The list object, that should be checked

attr

A string holding the name of the list element, that should be checked.

err_h

An error handler.

min_val

An optional argument, defining a minimal allowed value.

max_val

An numeric argument, defining the maximal allowed value.

allow_na

Are NA values allowed?

allow_null

A logical, defining whether the argument is allowed to be NULL.

allow_inf

An optional logical, defining if the value Inf is allowed.


a-maldet/readall documentation built on Dec. 18, 2021, 9:23 p.m.