is.odd function

Determine if a number is odd or even.

Determine if a number is odd or even.

is.odd(x) is.even(x)

Arguments

  • x: A numeric vector.

Returns

A logical vector of the same length as x.

Examples

## Individual values is.odd(1) is.odd(2) is.even(3) is.even(4) ## Vector of values d <- 1:8 data.frame(d,odd=is.odd(d),even=is.even(d))

Author(s)

Derek H. Ogle, DerekOgle51@gmail.com

  • Maintainer: Derek H. Ogle
  • License: GPL (>= 2)
  • Last published: 2025-01-07