Learn R Programming

schoolmath (version 0.4.1)

is.even: check whether numbers of a vector are even

Description

This function checks whether the numbers of a vector are even. It returns TRUE/FALSE

Usage

is.even(x)

Arguments

x

A number or vector to be checked

Author

Joerg Schlarmann

See Also

is.odd

Examples

Run this code

is.even(3)  # this will return FALSE
is.even(2)  # this will return TRUE

x <- c(1,2,3,4,5, 6, 7)
is.even(x)

Run the code above in your browser using DataLab