is_nn: Check if value is NULL or NA

Description Usage Arguments Details Value Examples

View source: R/utils.r

Description

Returns TRUE if object is either NULL or NA.

Usage

1
is_nn(x)

Arguments

x

object to be tested

Details

The no value NULL and missing value NA are both used to signify no value. NULL is often used as an empty parameter in functions and NA is used for the same reason in the argparser::argparser package (because setting value to NULL in list and environments means to delete it).

For this reason, a missing (unspecified) parameter can can reach function as both NULL and NA. This is simple shorthand to test both conditions.

Value

TRUE if the value is NULL or all values are NA

Examples

1
2

bioDS/phyloRNA documentation built on Feb. 21, 2022, 3:28 p.m.