is_integer_value: Checks if the passed value is a single integer value (not...

View source: R/integer_value.R

is_integer_valueR Documentation

Checks if the passed value is a single integer value (not type).

Description

Checks if the passed value is a single integer value (not type).

Usage

is_integer_value(
  value,
  min = NULL,
  max = NULL,
  inclusive_min = TRUE,
  inclusive_max = TRUE,
  allow_na = FALSE,
  allow_null = FALSE
)

Arguments

value

the value to verify

min

minimum value to constraint the integer, inclusive

max

maximum value to constraint the integer, inclusive

inclusive_min

if TRUE (default) the min value is checked inclusive. If FALSE, the min value will be checked exclusive.

inclusive_max

if TRUE (default) the max value is checked inclusive. If FALSE, the max value will be checked exclusive

allow_na

if TRUE, accepts a NA value

allow_null

if TRUE, accepts a null value

Examples

## Not run: 
# For assertion
assertthat::assert_that(qscheck::is_integer_value(my_parameter))
# For check
if (qscheck::is_integer_value(my_parameter)) {}

## End(Not run)


AstraZeneca/qscheck documentation built on Nov. 1, 2023, 4:45 a.m.