A positive integer is a whole number that is greater than 0.
Details
This check requires `is.integer(x)` to be true. If you want a more flexible check that allows for numbers of type `numeric` but still want them to be integers, then use `is_whole_number()`.
`NA`s are ignored as long as they are `NA_integer`.
Examples
is_positive_integer(c(1L, 2L, 4L)) # TRUE
#> [1] TRUE
is_positive_integer(2.4) # FALSE
#> [1] FALSE
is_positive_integer(-3) # FALSE
#> [1] FALSE