Learn R Programming

envnames (version 0.4.1)

is_null_or_na: Check whether an object is NULL or NA.

Description

This function silently handles special cases for which is.null() and is.na() may return a warning, such as functions objects or environments. (e.g. the warning "Warning message: In is.na(g) : is.na() applied to non-(list or vector) of type 'closure')"

Usage

is_null_or_na(x)

Arguments

x

object to check.

Value

boolean indicating whether the object is NULL or NA. FALSE is returned if the object does not exist.