Learn R Programming

Boom (version 0.9.15)

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

Description

Check whether a number is even or odd.

Usage

IsEven(x)
IsOdd(x)

Value

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

Arguments

x

An integer or vector of integers.

Author

Steven L. Scott

Examples

Run this code
IsEven(2) ## TRUE
IsOdd(2)  ## FALSE

Run the code above in your browser using DataLab