is.none: Truth checking as in Python

View source: R/check.R

is.noneR Documentation

Truth checking as in Python

Description

Returns TRUE if x is either FALSE, 0, NULL, NAand empty lists or an empty string. Inspired by python's bool.

Usage

is.none(x)

Arguments

x

object to test

Value

TRUE if x is FALSE, 0, NULL, NA, an empty list or an empty string. Else FALSE.

Examples

is.none(FALSE) # TRUE
is.none(0) # TRUE
is.none(1) # FALSE
is.none(NA) # TRUE
is.none(list()) # TRUE
is.none("") # TRUE
is.none(character()) # TRUE
is.none(numeric()) # TRUE
is.none(logical()) # TRUE

toscm/toscutil documentation built on Feb. 23, 2025, 2:20 p.m.