message
Diagnostic Messages

### Description

Creates a diagnostic message using the input arguments.

### Usage

    message(..., domain = NULL, appendLF = TRUE)
    suppressMessages(expr, classes = "message")
    packageStartupMessage(..., domain = NULL, appendLF = TRUE)
    .packageStartupMessage(message, call = NULL)
    suppressPackageStartupMessages(expr)
    .makeMessage(..., domain = NULL, appendLF = FALSE)

### Arguments

... | zero or more objects that can be coerced to character strings. For message, it can also be an object that inherits from the class "condition".
domain | a character string specifying the domain to use for language translation. see gettext for more details.
appendLF | a logical value. If TRUE (the default), a new line character is appended to the message.
expr | the expression to be evaluated.
classes | a vector of class names.
message | a character string containing the message.
call | a function call.

### Details

- message coerces its arguments to character strings, and then prints them out to the error connection (stderr). The message text can be translated according to domain. A line feed character ("\n") is appended to the text if appendLF is set to TRUE.
- suppressMessages evaluates the expression expr, but it causes any messages resulting from the evaluation to be ignored if the message condition object class contains any of the classes in classes.
- packageStartupMessage prints out its arguments to the error connection (stderr).
- suppressPackageStartupMessages is parallel to the function message. It is used to evaluate the expression and to suppress all packageStartupMessage messages.
- .packageStartupMessage creates an object of class packageStartupMessage from the arguments message and call.
- .makeMessage generates message text by pasting all ... arguments (with no separator) and an option line feed.

When a message occurs, you can specify more complex behavior using the condition system, via functions such as withCallingHandlers and tryCatch. If a condition object is passed as the only argument to message, it is used to signal the event, rather than constructing a simpleMessage condition object.
Value

message | returns NULL invisibly.
suppressMessages | returns the value of expr.
packageStartupMessage | returns NULL invisibly.
.packageStartupMessage | returns an object of class c("packageStartupMessage", "condition", "message", "simpleMessage") with two components: message and call.
.makeMessage | returns a character string.

See Also
gettext, stop, warning, condition
Examples

    message("This is a message:", 1, 2, 3, domain =  "", appendLF = TRUE)
    # print message: This is a message:123
    suppressMessages(message("This is a message"))
    # don't print anything
    packageStartupMessage("This is a package start message:", 1, 2, 3,
       appendLF = TRUE)
    # print message: This is a package start message:123
    suppressPackageStartupMessages(packageStartupMessage("This is a
       package start message:", 1, 2, 3, appendLF = TRUE))
    # don't print anything
    .makeMessage("This is a message:", 1, 2, 3, appendLF = TRUE)
    # create message text string
    .packageStartupMessage(message = .makeMessage("This is a package start
        message:", 1, 2, 3, appendLF = TRUE), call = NULL)
    # create packageStartupMessage condition

Package base version 6.1.5-18
Package Index