is.boolean: Boolean

Description Usage Arguments Value Examples

View source: R/utils.R

Description

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

Usage

1

Arguments

x

an object to check

Value

a logical value indicating whether provided object is a boolean

Examples

1
2
3
4
5
6
7
8
## 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 May 29, 2017, 11:01 a.m.