[Rd] Request for stopifnot
Tim Taylor
t|m@t@y|or @end|ng |rom h|ddene|eph@nt@@co@uk
Wed Oct 6 10:25:37 CEST 2021
Would R-core be receptive to adding an additional parameter to stopifnot so we can hide the call in the output as in stop?
i.e. The signature would become:
stopifnot2 <- function (..., exprs, exprObject, local = TRUE, .call = TRUE)
It looks like this would be a one-line change to the the underlying stop call to:
stop(simpleError(msg, call = if((p <- sys.parent(1L)) && isTRUE(.call)) sys.call(p)))
Best
Tim
More information about the R-devel
mailing list