is.boolean: Boolean

View source: R/utils.R

is.booleanR Documentation

Boolean

Description

Checks if provided object is a boolean i.e. a length-one logical vector.

Usage

is.boolean(x)

Arguments

x

an object to check

Value

a logical value indicating whether provided object is a boolean

Examples

## Not run: 
    is.boolean(TRUE)                # [1] TRUE
    # the following will work on most systems, unless you have tweaked global Rprofile
    is.boolean(T)                   # [1] TRUE
    is.boolean(1)                   # [1] FALSE
    is.string(c("foo", "bar"))      # [1] FALSE

## End(Not run)

rapportools documentation built on March 22, 2022, 1:06 a.m.