Learn R Programming

schoolmath (version 0.5.1)

is.odd: Checks whether numbers are odd.

Description

Checks whether numbers are odd.

Usage

is.odd(x)

Value

A logical vector of the same length as `x`.

Arguments

x

A numeric vector.

Examples

Run this code
is.odd(45)     # will return TRUE
is.odd(46)     # will return FALSE
is.odd(45.123) # will return FALSE

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

Run the code above in your browser using DataLab