Learn R Programming

rkeops (version 2.2.2)

msg_warn_error: Print message or raise warning or error

Description

Different behavior to provide information to the user (either a message, a warning or an error).

Usage

msg_warn_error(msg, type, startup = FALSE)

Arguments

msg

character string, text message.

type

character string, among "msg" to print a message, "warn" for to raise a warning, and "error" to raise an error.

startup

boolean indicating if the function is called at startup or not.

Author

Ghislain Durif

Details

If type = "msg", then a message with content msg is printed. If type = "warning", then a warning with message msg is raised. And if type = "error", then an error with message msg is raised.

If type = "msg" and startup = TRUE, then packageStartupMessage() function is used instead of message().