R/isint.R

Defines functions is.int

Documented in is.int

#' Check if number is integer or a real number
#'
#' @param x numeric vector
#' 
#' @export

is.int <- function(x) {
  stopifnot(is.numeric(x))
  all(na.omit(x) %% 1 == 0)
}
twolodzko/twextras documentation built on May 3, 2019, 1:52 p.m.