
Last chance! 50% off unlimited learning
Sale ends in
These predicates check whether R considers a number vector to be
integer-like, according to its own tolerance check (which is in
fact delegated to the C library). This function is not adapted to
data analysis, see the help for base::is.integer()
for examples
of how to check for whole numbers.
is_integerish(x, n = NULL, finite = TRUE)is_bare_integerish(x, n = NULL)
is_scalar_integerish(x)
Object to be tested.
Expected length of a vector.
Whether values must be finite. Examples of non-finite
values are Inf
, -Inf
and NaN
.
is_bare_numeric()
for testing whether an object is a
base numeric type (a bare double or integer vector).
# NOT RUN {
is_integerish(10L)
is_integerish(10.0)
is_integerish(10.0, n = 2)
is_integerish(10.000001)
is_integerish(TRUE)
# }
Run the code above in your browser using DataLab