is_value: Check if the passed entity is a single value, regardless of...

View source: R/value.R

is_valueR Documentation

Check if the passed entity is a single value, regardless of the type.

Description

Check if the passed entity is a single value, regardless of the type.

Usage

is_value(value, allow_na = FALSE, allow_null = FALSE)

Arguments

value

the value to check

allow_na

if true, accept a value that is NA of any type.

allow_null

if true, accept a value that is NULL.

Examples

## Not run: 
# For assertion
assertthat::assert_that(qscheck::is_value(value))
# For check
if (qscheck::is_value(value)) {}

## End(Not run)


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