is_falsy: Is an object FALSY?

Description Usage Arguments Details Value Examples

Description

Everything that is FALSE is also falsy. Everything that is TRUE, is also truthy. Other things are either falsy, or truthy, see the details below.

Usage

1
is_falsy(object)

Arguments

object

The object.

Details

Falsy objects are:

Everything else is truthy.

Value

Logical scalar.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## NULL is falsy
is_falsy(NULL)

## So is the empty string
is_falsy("")

## But the zero string is not
is_falsy("0")

## Clasess are truthy
is_falsy(factor())

## Errors reported by try() are falsy
is_falsy(try(a + "string", silent = TRUE))

gaborcsardi/falsy documentation built on May 16, 2019, 4:09 p.m.