Skip to contents

Test whether an R object is not NULL.

Usage

not.null(x)

Arguments

x

an R object to be tested.

Value

TRUE if object is not entirely NULL, otherwise FALSE.

Examples

not.null(0) ## TRUE
#> Error in not.null(0): could not find function "not.null"
not.null(NA_character_) ## TRUE
#> Error in not.null(NA_character_): could not find function "not.null"
not.null(NULL) ## FALSE
#> Error in not.null(NULL): could not find function "not.null"
not.null(c(NULL, 0)) ## TRUE
#> Error in not.null(c(NULL, 0)): could not find function "not.null"
not.null(c(a=NULL, b=NULL)) ## FALSE
#> Error in not.null(c(a = NULL, b = NULL)): could not find function "not.null"