.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
.
Taken from https://github.com/Rapporter/rapportools/blob/master/R/utils.R
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.