Return TRUE if n is an integer that is not evenly divisible by 2.

isOdd(n)

Arguments

n

A numeric vector.

Value

A logical vector the same length as n. TRUE if n is an integer and is even, FALSE if n is an integer and not even, NA otherwise.

Details

Test whether elements of numeric vector are odd. For whole numbers return TRUE or FALSE. For decimals return NA.