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

Truthy(.x)

Arguments

.x

an object.

Value

a logical value.

See also

Other predicate functions: Existy

Examples

# Returns if a value exists or not: Truthy(TRUE) # TRUE
#> [1] TRUE
Truthy(FALSE) # FALSE
#> [1] FALSE
Truthy(NULL) # FALSE
#> [1] FALSE
Truthy(NA) # FALSE
#> [1] FALSE
Truthy(2L) # TRUE
#> [1] FALSE
Truthy(1L) # TRUE
#> [1] FALSE
Truthy(0L) # FALSE
#> [1] FALSE
Truthy("a") # TRUE
#> [1] FALSE