message(base)
message()所属R语言包:base
Diagnostic Messages
诊断消息
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Generate a diagnostic message from its arguments.
从它的参数生成的诊断消息。
用法----------Usage----------
message(..., domain = NULL, appendLF = TRUE)
suppressMessages(expr)
packageStartupMessage(..., domain = NULL, appendLF = TRUE)
suppressPackageStartupMessages(expr)
.makeMessage(..., domain = NULL, appendLF = FALSE)
参数----------Arguments----------
参数:...
zero or more objects which can be coerced to character (and which are pasted together with no separator) or (for message only) a single condition object.
零个或多个对象可以强制转换为字符(并粘贴在一起没有分离)或(message)一个条件对象。
参数:domain
see gettext. If NA, messages will not be translated.
看到gettext。如果NA,消息不会被翻译。
参数:appendLF
logical: should messages given as a character string have a newline appended?
逻辑:作为字符串的消息应该有一个换行符附加?
参数:expr
expression to evaluate.
表达式。
Details
详情----------Details----------
message is used for generating "simple" diagnostic messages which are neither warnings nor errors, but nevertheless represented as conditions. Unlike warnings and errors, a final newline is regarded as part of the message, and is optional. The default handler sends the message to the stderr() connection.
message用于产生“简单”的诊断消息,既不是警告也不是错误的,但作为条件,但代表。警告和错误不同,最后的换行符被视为消息的一部分,并且是可选的。默认的处理程序将消息发送到stderr()连接。
If a condition object is supplied to message it should be the only argument, and further arguments will be ignored, with a warning.
如果条件的对象提供给message它应该是唯一的参数,并进一步的参数将被忽略警告。
While the message is being processed, a muffleMessage restart is available.
虽然正在处理的消息,muffleMessage重新启动。
suppressMessages evaluates its expression in a context that ignores all "simple" diagnostic messages.
suppressMessages评估其在上下文中的表达,忽略了所有的“简单”的诊断消息。
packageStartupMessage is a variant whose messages can be suppressed separately by suppressPackageStartupMessages. (They are still messages, so can be suppressed by suppressMessages.)
packageStartupMessage是一个变种的消息suppressPackageStartupMessages分开,可以抑制。 (他们仍然是信息,因此可以抑制suppressMessages。)
.makeMessage is a utility used by message, warning and stop to generate a text message from the ... arguments by possible translation (see gettext) and concatenation (with no separator).
.makeMessage是message,warning和stop产生...参数可能翻译的文本消息(见gettext使用的实用工具)和连接(没有分隔)。
参见----------See Also----------
warning and stop for generating warnings and errors; conditions for condition handling and recovery.
warning和stop产生警告和错误;conditions条件处理和回收。
gettext for the mechanisms for the automated translation of text.
gettext文本自动翻译的机制。
举例----------Examples----------
message("ABC", "DEF")
suppressMessages(message("ABC"))
testit <- function() {
message("testing package startup messages")
packageStartupMessage("initializing ...", appendLF = FALSE)
Sys.sleep(1)
packageStartupMessage(" done")
}
testit()
suppressPackageStartupMessages(testit())
suppressMessages(testit())
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|