Currently, if stopifnot(expr) discovers a problem it does not print where the error came from, as if its call to stop() had call.=FALSE in it.
> f <- function(x) stopifnot(length(x)==1, x>0)
Error: x > 0 is not TRUE
It think it would make stopifnot more useful if it changed what I assume is something like
so we would see where the error came from
Error in f(-1) : x > 0 is not TRUE
One could make call=sys.call(-1) an argument to stopifnot() so one could chain together commonly used checks. The chaining would not be trivial since it must
use substitute() to make the text for the error message.