Learn R Programming

functools (version 0.2.0)

Truthy: Truthy

Description

Truthy() returns TRUE or FALSE if an object is TRUE or not. An object is is "TRUE" if it is exists and is TRUE.

Usage

Truthy(.x)

Arguments

.x
an object.

Value

a logical value.

See Also

Other predicate functions: Existy

Examples

Run this code
# Returns if a value exists or not:
Truthy(TRUE) # TRUE
Truthy(FALSE) # FALSE
Truthy(NULL) # FALSE
Truthy(NA) # FALSE
Truthy(2L) # TRUE
Truthy(1L) # TRUE
Truthy(0L) # FALSE
Truthy("a") # TRUE

Run the code above in your browser using DataLab