R/iswhole.R

Defines functions is.whole

Documented in is.whole

#' @title Integer Check
#' @description Checks whether the submitted value is an integer
#' @keywords internal
#' @param x A \code{numeric} value.
#' @return A \code{boolean} value indicating whether the value is an integer or not.
#' @author James Balamuta
#' @export
#' @examples
#' is.whole(2.3)
#' is.whole(4)
#' is.whole(c(1,2,3))
#' is.whole(c(.4,.5,.6))
#' is.whole(c(7,.8,9))
is.whole = function(x){ is.numeric(x) && all(floor(x)==x) } 
SMAC-Group/simts documentation built on Sept. 4, 2023, 5:25 a.m.