isEven | R Documentation |
Return TRUE if n is an integer evenly divisibly by 2.
isEven(n)
n |
A numeric vector. |
Test whether elements of a numeric vector are even. For whole numbers return TRUE or FALSE. For decimals return NA.
A logical vector the same length as n. TRUE if n is an integer and is even, FALSE if n is an integer and not even, NA otherwise.
David Braze davebraze@gmail.com
n <- 1:10 isEven(n) m <- seq(1, 10, .5) isEven(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.