| are_int_ish | R Documentation |
are_int_ish() is a vectorized predicate function that checks
whether each element of its input can be safely coerced to an integer
vector.
is_int_ish() is a scalar predicate function that checks if all elements
of its input can be safely coerced to an integer vector.
are_int_ish(x, ...)
is_int_ish(x, ...)
## S3 method for class 'character'
are_int_ish(x, ..., coerce_character = TRUE)
## S3 method for class 'factor'
are_int_ish(x, ..., coerce_factor = TRUE)
## Default S3 method:
are_int_ish(x, ..., depth = 1)
x |
The object to check. |
... |
Arguments passed to methods. |
coerce_character |
|
coerce_factor |
|
depth |
|
are_int_ish() returns a logical vector with the same length as the
input. is_int_ish() returns a length-1 logical (TRUE or FALSE) for
the entire vector.
are_int_ish(1:4)
is_int_ish(1:4)
are_int_ish(c(1.0, 2.0, 3.00000))
is_int_ish(c(1.0, 2.0, 3.00000))
are_int_ish(c("1.0", "2.0", "3.00000"))
is_int_ish(c("1.0", "2.0", "3.00000"))
are_int_ish(c(1, 2.2, NA))
is_int_ish(c(1, 2.2, NA))
are_int_ish(c("1", "1.0", "1.1", "a"))
is_int_ish(c("1", "1.0", "1.1", "a"))
are_int_ish(factor(c("1", "a")))
is_int_ish(factor(c("1", "a")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.