is.odd: Number Type

View source: R/logical.R

is.oddR Documentation

Number Type

Description

is.odd tests whether a number is odd. is.even returns the opposite

Usage

is.odd(x)

is.even(x)

Arguments

x

numeric object to be tested

Value

a vector of type logical

Note

if x contains NA the function returns NA

Examples

x <- seq(1, 9, 2)
is.odd(x)
y <- seq(2, 8, 2)
is.even(y)
# NA values
x[1] <- NA
is.odd(x)


HydroCode documentation built on March 31, 2023, 6:29 p.m.

Related to is.odd in HydroCode...