> Functions like sapply vs mapply are tricky to reason about from the documentation alone.
Could you please expand on that? It's unclear what you're referring to.
> The values NA vs Null vs integer(0) are all used as standins for real thrown errors and knowing which one to check for after calling a function can be tough.
`checkmate::assert_numeric()` (or similar)
with base R you want isTRUE():
`stopifnot(isTRUE(is.finite(x)))` (or is.na or anything else) will error on empty values.