R/is_positive_integer.R

Defines functions is_positive_integer

is_positive_integer <- function(x) {
    if (is.null(x) || is.na(x) || !is.numeric(x)) {
        return(FALSE)
    }

    (x %% 1 == 0) && (x > 0)
}
hadexversum/iaoreader documentation built on March 9, 2021, 2:04 p.m.