Skip to contents

Tests if a value is an integer.

Usage

is_int_val(x)

Arguments

x

The value to test.

Value

TRUE if the value is a number with no decimal value, FALSE otherwise.

Examples

is_int_val("5")     # => FALSE
#> [1] FALSE
is_int_val(10)      # => TRUE
#> [1] TRUE
is_int_val(16.5)    # => FALSE
#> [1] FALSE
is_int_val("apple") # => FALSE
#> [1] FALSE
is_int_val(-1)      # => TRUE
#> [1] TRUE