Check that value x is single positive

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

Arguments

x

Value to check if single positive

zero_allowed

Indicator (TRUE/FALSE) of whether zero is allowed

name

Name

Details

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