powered by
Test if is a positive integer
is_positive_integer(x)
an R object
is_positive_integer(1) # TRUE is_positive_integer(0) # FALSE is_positive_integer(pi) # FALSE is_positive_integer(2.2) # FALSE is_positive_integer(-1) # FALSE
Run the code above in your browser using DataLab