Quitely quit R with messages in non-interactive sessions
qqmsg(..., status = 0, save = FALSE, runLast = TRUE)
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) { # \dontrun{
qqmsg()
qqmsg("die", status=0)
qqmsg("Avada kedavra", status=-1)
qqmsg("Crucio!", "\n", "Avada kedavra", status=-100)
} # }