check-vector-isIntegerish | R Documentation |
Check for valid input of either explicit (e.g. 1L
) and/or implict
(e.g. 1
) integer
.
isIntegerish(x, infiniteOk = TRUE, naOk = FALSE)
allAreIntegerish(x)
isInt(x, nullOk = FALSE)
x |
Object. |
infiniteOk |
|
naOk |
|
nullOk |
|
TRUE
on success;
FALSE
on failure, with cause set.
isIntegerish()
: Vectorized.
allAreIntegerish()
: Scalar.
isInt()
: Scalar.
Updated 2023-09-29.
isInt()
or isScalarIntegerish()
for scalar.
rlang::is_integerish()
.
checkmate::checkIntegerish()
.
## TRUE ====
isIntegerish(seq_len(2L))
isIntegerish(c(1, 2))
isIntegerish(S4Vectors::Rle(c(1, 2)))
## FALSE ====
isIntegerish(0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.