Learn R Programming

rtemis (version 0.79)

msg: Message with provenance

Description

Print message to output with a prefix including data and time, and calling function or full call stack

Usage

msg(..., date = TRUE, call.depth = 1, caller.id = 1,
  newline = FALSE, newline.pre = FALSE, as.message = FALSE,
  color = NULL, sep = " ")

msg0(..., date = TRUE, call.depth = 1, caller.id = 1, newline = FALSE, newline.pre = FALSE, as.message = FALSE, color = NULL)

Arguments

...

Message to print

date

Logical: if TRUE, include date and time in the prefix

call.depth

Integer: Print the system call path of this depth. Default = NULL

caller.id

Integer: Which function in the call stack to print

newline

Logical: If TRUE end with a new line. Default = FALSE

newline.pre

Logical: If TRUE begin with a new line. Default = FALSE

as.message

Logical: if TRUE, print using message()

color

Color for message to use with crayon

sep

String: Use to separate objects in ...

Value

Invisibly: List with call, message, and date

Details

If msg is called directly from the console, it will print [interactive>] in place of the call stack. msg0, similar to paste0, is msg(..., sep = "")