R/is_odd.r

Defines functions is_odd

Documented in is_odd

#' Conditional check for an odd value
#'
#' @description Return TRUE if the value is odd.
#'
#' @eval arg_vector("x","numeric")
#'
#' @return A boolean vector with the return from the condition check.
#' @export
#'
#' @examples
#'
#' is_odd(4)
#'
#' is_odd(3)
#'

is_odd <- function(x){

  stopifnot(is.numeric(x))

  output <- !relper::is_even(x)

  return(output)

}
vbfelix/relper documentation built on May 10, 2024, 10:50 p.m.