Check if even

is_even(x)

Arguments

x

A numeric vector.

Value

logical; Whether the integer is even or odd.

Examples

is_even(1:10)
#>  [1] FALSE  TRUE FALSE  TRUE FALSE  TRUE FALSE  TRUE FALSE  TRUE
is_even(10L)
#> [1] TRUE