From t|m@t@y|or @end|ng |rom h|ddene|eph@nt@@co@uk  Wed Oct  6 10:25:37 2021
From: t|m@t@y|or @end|ng |rom h|ddene|eph@nt@@co@uk (Tim Taylor)
Date: Wed, 6 Oct 2021 08:25:37 +0000
Subject: [Rd] Request for stopifnot
Message-ID: <LO0P265MB260254C21367AC632873C463DDB09@LO0P265MB2602.GBRP265.PROD.OUTLOOK.COM>

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


[Rd] Request for stopifnot
Tim Taylor