is.odd {HydroCode} | R Documentation |
Number Type
Description
is.odd
tests
whether a number is odd. is.even
returns the opposite
Usage
is.odd(x)
is.even(x)
Arguments
x |
numeric object to be tested |
Value
a vector of type logical
Note
if x
contains NA
the function returns NA
Examples
x <- seq(1, 9, 2)
is.odd(x)
y <- seq(2, 8, 2)
is.even(y)
# NA values
x[1] <- NA
is.odd(x)
[Package HydroCode version 1.0.3 Index]