is.boolean | R Documentation |
Checks if provided object is a boolean i.e. a length-one logical vector.
is.boolean(x)
x |
an object to check |
a logical value indicating whether provided object is a boolean
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.