Learn R Programming

ribiosUtils (version 1.5-6)

qqmsg: Quitely Quit with Messages

Description

Quitely quit R with messages in non-interactive sessions

Usage

qqmsg(..., status = 0, save = FALSE, runLast = TRUE)

Arguments

Messages to be passed to message

status

Quit stats

save

Logical, should current working environment be saved?

runLast

Logical, should .Last() be executed?

Value

Invisible NULL, only side effect is used.

Details

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

See Also

quit

Examples

Run this code
# NOT RUN {
## the example should not run because it will lead the R session to quit
# }
# NOT RUN {
  qqmsg()
  qqmsg("die", status=0)
  qqmsg("Avada kedavra", status=-1)
  qqmsg("Crucio!", "\n", "Avada kedavra", status=-100)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab