is_onezero | R Documentation |
Checks to see if the vector is numeric and contains only ones and zeros, or if the vector of class logical. Missing values are permitted.
is_onezero(x)
x |
A vector. |
TRUE
or FALSE
onezero()
is_onezero(c(1, 0, NA))
is_onezero(c(1, 0, -1))
is_onezero(c(TRUE, FALSE, FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.