A common interface for printing messages of several types.
print_message(..., type, sep = "", date = FALSE, date_format = "")
R
objects which are concatenated.
Type of the output .Accepted values:
'message' for a diagnostic message;
'string' for a character output;
'cat' for the output of cat
function;
'error' and 'warning' for an error or warning message.
Intentionally, no default value is defined.
(optional) character used to separate input values (default is nothing).
Logical value: set TRUE to place the date before the message (useful for logs or time consuming operations); default is FALSE.
Format of the date (see strftime
)
for the definition of the format). The default format is
"%Y-%m-%d %H:%M:%S".
Message (in the defined format).
Several functions print messages in different formats
(message, error, warning, cat, R output) and with different syntaxes
(concatenating parameters or accepting a single argument, appending
a new line, etc.).
This accessory function provides a common interface for different types:
several arguments are accepted and concatenated with the sep
argument;
the format is defined with the format
argument; a date is optionally
placed before the message.