View source: R/Transform_01_to_FT.R
test_01 | R Documentation |
This function tests whether the vector is actually a boolean, but is encoded as a 0/1 variable. The function checks for numeric vectors whether the only occurring values are 0, 1, or NA. At character and factor vectors checks whether the only occurring values are "0", "1", or NA to be. If there is a 0/1 variable, TRUE is returned, in all others cases FALSE.
test_01(x)
x |
The vector to test |
A TRUE/FALSE value on the test
Other booleans:
transform_01_to_ft()
vector <- c(0, 1, 0, 1, 1, 1, 0)
test_01(vector)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.