Assertion for Positive Number
assert_positive_number(x, zero_ok = FALSE)
what to check.
(flag
)
whether x
can be zero or not.
Raises an error if x
is not a single positive (or non-negative) number.
assert_positive_number(3.2)
assert_positive_number(0, zero_ok = TRUE)