R/is-even.R

Defines functions is_even

Documented in is_even

#' Check if even
#'
#' @param x A numeric vector.
#' @return logical; Whether the integer is even or odd.
#' @examples
#' is_even(1:10)
#' is_even(10L)
#' @export
is_even <- function(x) {
  x %% 2 == 0
}

Try the campfin package in your browser

Any scripts or data that you put into this service are public.

campfin documentation built on Oct. 20, 2023, 5:06 p.m.