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)
}
tmakowski/iaoreader documentation built on March 8, 2021, 6:11 p.m.