| are_lgl_ish | R Documentation |
are_lgl_ish() is a vectorized predicate function that checks whether each
element of its input can be safely coerced to a logical vector.
is_lgl_ish() is a scalar predicate function that checks if all elements of
its input can be safely coerced to a logical vector.
are_lgl_ish(x, ...)
is_lgl_ish(x, ...)
## Default S3 method:
are_lgl_ish(x, ..., depth = 1)
x |
The object to check. |
... |
Arguments passed to methods. |
depth |
|
are_lgl_ish() returns a logical vector with the same length as the
input. is_lgl_ish() returns a length-1 logical (TRUE or FALSE) for
the entire vector.
are_lgl_ish(c(TRUE, FALSE, NA))
is_lgl_ish(c(TRUE, FALSE, NA))
are_lgl_ish(c(1, 0, 1.0, NA))
is_lgl_ish(c(1, 0, 1.0, NA))
are_lgl_ish(c("T", "F", "TRUE", "FALSE", "true", "false", "1", "0"))
is_lgl_ish(c("T", "F", "TRUE", "FALSE", "true", "false", "1", "0"))
are_lgl_ish(c("T", "F", "a", "1.1"))
is_lgl_ish(c("T", "F", "a", "1.1"))
are_lgl_ish(factor(c("T", "a")))
is_lgl_ish(factor(c("T", "a")))
are_lgl_ish(list(TRUE, 0, "F", "a"))
is_lgl_ish(list(TRUE, 0, "F", "a"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.