example_fun <- function(num1, num2) {
assert_integer_scalar(num1, subset = "positive")
assert_integer_scalar(num2, subset = "negative")
}
example_fun(1, -9)
try(example_fun(1.5, -9))
try(example_fun(2, 0))
try(example_fun("2", 0))
Run the code above in your browser using DataLab