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