Skip to contents

Does the input contain a boolean flag?

Usage

isFlag(x)

Arguments

x

Object.

Value

TRUE on success; FALSE on failure, with cause set.

Note

Updated 2019-08-10.

Examples

## TRUE ====
isFlag(TRUE)
#> [1] TRUE
isFlag(FALSE)
#> [1] TRUE

## FALSE ====
isFlag(c(TRUE, TRUE))
#> [1] FALSE
isFlag(1)
#> [1] FALSE
isFlag(NA)
#> [1] FALSE