This function checks if a numeric value is and integer-like scalar, meaning it is numeric and its length is 1.
Examples
is_integerlike(3) # TRUE
#> [1] TRUE
is_integerlike(3.5) # FALSE
#> [1] FALSE
is_integerlike("3") # FALSE
#> [1] FALSE
is_integerlike(c(1, 2)) # FALSE
#> [1] FALSE