Description Usage Arguments Details Value Examples
View source: R/is.incalogical.R
Boolean vectors in INCA are stored internally as 0/1 and are changed to "True"/blank when exported. These functions identify such a variable as Boolean and can coerce it to such.
1 2 3 |
x |
vector (potentially logical) |
It is common that check boxes are blanks by default but that this should
be interpreted as TRUE. There are however some uncommon cases
were the boxes are marked with "False" for FALSE.
We can therefore not be certain of the meaning of a blank value.
These will therefore be treated as NA.
is.incalogical returns TRUE if the vector
is logical according to INCA:s internal rules, FALSE otherwise.
incalogical2logical returns a logical vector if x
can be coerced to such.
1 2 3 4 | is.incalogical(c("", "", "True", "")) # TRUE
is.incalogical(c("", "False", "", "")) # TRUE
is.incalogical(c("", "FALSE", "", "")) # FALSE
is.incalogical(logical(2)) # will be recognised as well
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.