Quitely quit R with messages in non-interactive sessions
qqmsg(..., status = 0, save = FALSE, runLast = TRUE)
Messages to be passed to message
Quit stats
Logical, should current working environment be saved?
Logical, should .Last()
be executed?
Invisible NULL
, only side effect is used.
The function prints messages in any case, and quits R if the current session is non-interactive, e.g. in the command-line running Rscript mode
## the example should not run because it will lead the R session to quit
if (FALSE) {
qqmsg()
qqmsg("die", status=0)
qqmsg("Avada kedavra", status=-1)
qqmsg("Crucio!", "\n", "Avada kedavra", status=-100)
}