Check that value x is positive integer

assert_pos_int(x, zero_allowed = TRUE, name = deparse(substitute(x)))

Arguments

x

Value to check if positive integer

zero_allowed

Indicator (TRUE/FALSE) of whether zero is allowed

name

Name

Details

Check that x is positive integer (zero allowed or disallowed using zero_allowed parameter)