R/am.smath.r

#' Test if is whole number
#'
#' Test if the number is the whole number
#'
#' @param x numeric
#' @param threshold numeric: tolerance, threshold
#' @return Logical
#' @seealso ...
#' @export

amm.is.wholenumber <- function(x
                               , threshold = .Machine$double.eps ^ 0.5) {
  abs(x - round(x)) < threshold
}
ameshkoff/amdata documentation built on May 10, 2019, 1:08 a.m.