Learn R Programming

tester (version 0.2.0)

is_odd: Is even

Description

Test if an object is an even number
is_not_odd tests the opposite condition

Usage

is_odd(x)

Arguments

x

an R object

See Also

is_even

Examples

Run this code
is_odd(2)
is_odd(1)
is_odd(seq(-5, 5))

is_odd(iris$Species)
is_odd(iris)
is_odd(list(1, 0, -1, iris))

set.seed(999)
M = matrix(1:12, 4, 3)
is_odd(M)

Run the code above in your browser using DataLab