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)

is_bare_integerish(x, n = NULL)

is_scalar_integerish(x)

## Arguments

x Object to be tested. Expected length of a vector.

is_bare_numeric() for testing whether an object is a base numeric type (a bare double or integer vector).

## Examples

is_integerish(10L)#> [1] TRUEis_integerish(10.0)#> [1] TRUEis_integerish(10.000001)#> [1] FALSEis_integerish(TRUE)#> [1] FALSE