Learn R Programming

Boom (version 0.8)

is.even: Check whether a number is even or odd.

Description

Check whether a number is even or odd.

Usage

IsEven(x)
IsOdd(x)

Arguments

x

An integer or vector of integers.

Value

Logical indicating whether the argument is even (or odd).

Examples

Run this code
# NOT RUN {
IsEven(2) ## TRUE
IsOdd(2)  ## FALSE
# }

Run the code above in your browser using DataLab