powered by
This function is identical to base R's warning, but it includes logging of the exception message via loggit().
warning
loggit()
warning( ..., call. = TRUE, immediate. = FALSE, noBreaks. = FALSE, domain = NULL, .loggit = NA, echo = get_echo() )
The warning message as character string, invisibly.
character
zero or more objects which can be coerced to character (and which are pasted together with no separator) or a single condition object.
logical, indicating if the call should become part of the warning message.
logical, indicating if the call should be output immediately, even if getOption("warn") <= 0.
getOption("warn") <= 0
logical, indicating as far as possible the message should be output as a single line when options(warn = 1).
options(warn = 1)
see gettext. If NA, messages will not be translated, see also the note in stop.
gettext
NA
stop
Should the condition message be added to the log? If NA the log level set by set_log_level() is used to determine if the condition should be logged.
set_log_level()
Should the log entry (json) be echoed to stdout as well?
stdout
Other handlers: message(), stop(), stopifnot()
message()
stop()
stopifnot()
if (FALSE) { warning("You may want to review that math") warning("You may want to review that math", immediate = FALSE, echo = FALSE) }
Run the code above in your browser using DataLab