is.odd | R Documentation |
is.odd
tests
whether a number is odd. is.even
returns the opposite
is.odd(x)
is.even(x)
x |
numeric object to be tested |
a vector of type logical
if x
contains NA
the function returns NA
x <- seq(1, 9, 2)
is.odd(x)
y <- seq(2, 8, 2)
is.even(y)
# NA values
x[1] <- NA
is.odd(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.