qqmsg: Quitely Quit with Messages

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/qqmsg.R

Description

Quitely quit R with messages in non-interactive sessions

Usage

1
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?

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

Value

Invisible NULL, only side effect is used.

Author(s)

Jitao David Zhang <jitao_david.zhang@roche.com>

See Also

quit

Examples

1
2
3
4
5
6
7
8
## 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)

## End(Not run)

ribiosUtils documentation built on March 13, 2020, 2:54 a.m.