Learn R Programming

tableHTML (version 2.1.2)

odd: Get the odd or even numbers from a numeric vector

Description

Get the odd or even numbers from a numeric vector

Usage

odd(vec)

even(vec)

Value

A numeric atomic vector with the odd / even numbers

Arguments

vec

A numeric atomic vector.

Details

odd will extract the odd numbers from a vector.
even will extract the even numbers from a vector

Examples

Run this code
odd(1:10)
even(1:10)

Run the code above in your browser using DataLab