R语言 print函数的参数

print.default(base)
print.default()所属R语言包:base

                                        Default Printing
                                         默认的打印

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

print.default is the default method of the generic print function which prints its argument.
print.default通用print功能,打印它的参数的默认方法。


用法----------Usage----------


## Default S3 method:[默认方法]
print(x, digits = NULL, quote = TRUE,
      na.print = NULL, print.gap = NULL, right = FALSE,
      max = NULL, useSource = TRUE, ...)



参数----------Arguments----------

参数:x
the object to be printed. 
要打印的对象。


参数:digits
a non-null value for digits specifies the minimum number of significant digits to be printed in values.  The default, NULL, uses getOption(digits).  (For the interpretation for complex numbers see signif.) Non-integer values will be rounded down, and only values greater than or equal to 1 and no greater than 22 are accepted.  
非空值的digits指定的最低数量在印值的有效位数。默认情况下,NULL使用getOption(digits)。 (见复数的解释signif。)非整数值将下调,只值大于或等于1,不大于22接受。


参数:quote
logical, indicating whether or not strings (characters) should be printed with surrounding quotes. 
应印有逻辑,说明是否字符串(characterS)与周围的引号。


参数:na.print
a character string which is used to indicate NA values in printed output, or NULL (see "Details"). 
一个字符串,它是用来指示NA值在打印输出,或NULL(见“详细资料”)。


参数:print.gap
a non-negative integer ≤ 1024, or NULL (meaning 1), giving the spacing between adjacent columns in printed vectors, matrices and arrays. 
一个非负整数≤ 1024或NULL(意思是1),给人的印向量,矩阵和数组相邻的列之间的间距。


参数:right
logical, indicating whether or not strings should be right aligned.  The default is left alignment. 
逻辑,表示字符串是否应右对齐。默认是左对齐。


参数:max
a non-null value for max specifies the approximate maximum number of entries to be printed.  The default, NULL, uses getOption(max.print); see that help page for more details. 
为max非空值指定要打印的条目近似的最大数量。默认情况下,NULL使用getOption(max.print);看到更多的细节,帮助页面。


参数:useSource
logical, indicating whether to use source references or copies rather than deparsing language objects. The default is to use the original source if it is available. 
逻辑,指示是否使用源引用或复制,而非deparsing语言对象。默认是使用原来的源代码,如果它是可用的。


参数:...
further arguments to be passed to or from other methods.  They are ignored in this function. 
进一步的参数被传递到或从其他方法。他们忽略了这个功能。


Details

详情----------Details----------

The default for printing NAs is to print NA (without quotes) unless this is a character NA and quote =     FALSE, when is printed.
NA的是打印默认打印NA(不带引号),除非这是一个字符NA和quote =     FALSE时印。

The same number of decimal places is used throughout a vector.  This means that digits specifies the minimum number of significant digits to be used, and that at least one entry will be encoded with that minimum number.  However, if all the encoded elements then have trailing zeroes, the number of decimal places is reduced until at least one element has a non-zero final digit.  Decimal points are only included if at least one decimal place is selected.
整个向量使用相同数量的小数。这意味着digits指定要使用的有效位数的最低数量,并至少有一个条目将被编码,最低数量。然而,如果所有编码的元素,然后尾随零,小数位数减少,直到至少有一个元素都有一个非零的最后一位。如果至少有一个小数位被选中,只包括小数点。

Attributes are printed respecting their class(es), using the values of digits to print.default, but using the default values (for the methods called) of the other arguments.
打印属性,尊重他们的阶级(ES),使用digits值print.default,但其他参数使用默认值(方法)。

When the methods package is attached, print will call show for R objects with formal classes if called with no optional arguments.
当重视,methods包print将调用showR对象与正规类如果没有可选参数的要求。


大量数字----------Large number of digits----------

Note that for large values of digits, currently for digits >= 16, the calculation of the number of significant digits will depend on the platform's internal (C library) implementation of sprintf() functionality.
注意,为大值digits,digits >= 16,将取决于若干重大数字计算平台的内部(C库)执行sprintf()功能。


单字节语言环境----------Single-byte locales----------

If a non-printable character is encountered during output, it is represented as one of the ANSI escape sequences (\a, \b, \f, \n, \r, \t, \v, \\ and \0: see Quotes), or failing that as a 3-digit octal code: for example the UK currency pound sign in the C locale (if implemented correctly) is printed as \243.  Which characters are non-printable depends on the locale. (Because some versions of Windows get this wrong, all bytes with the upper bit set are regarded as printable on Windows in a single-byte locale.)
如果非打印字符在输出过程中遇到的,它代表一个ANSI转义序列(\a,\b,\f,\n,\r ,\t,\v,\\和\0:看到引号),或不作为3位八进制代码:例如英国的货币英镑符号印\243C语言(如果正确实施)。非打印的字符取决于语言环境。 (因为某些版本的Windows这个错误,所有字节的最高位集被视为可打印在单字节语言环境的Windows。)


多字节语言环境----------Multi-byte locales----------

In all locales, the characters in the ASCII range (0x00 to 0x7f) are printed in the same way, as-is if printable, otherwise via ANSI escape sequences or 3-digit octal escapes as described for single-byte locales.
在所有的语言环境,在ASCII范围的字符(0x000x7f)以同样的方式打印,如打印,否则通过ANSI转义序列或3位八进制转义作为描述单字节语言环境。

Multi-byte non-printing characters are printed as an escape sequence of the form \uxxxx (in hexadecimal). This is the Unicode point of the character.
打印多字节非打印字符作为转义序列的形式\uxxxx(十六进制)。这是字符的Unicode点。

It is possible to have a character string in a character vector that is not valid in the current locale.  If a byte is encountered that is not part of a valid character it is printed in hex in the form \xab and this is repeated until the start of a valid character.
这是可能有一个字符向量中的字符串是不是在目前的语言环境中有效。如果遇到一个字节是不是一个有效的字符,它印在十六进制的形式\xab,这是一个有效的字符开始,直到重复。


参见----------See Also----------

The generic print, options. The "noquote" class and print method.
通用print,options。 "noquote"类和打印的方法。

encodeString, which encodes a character vector the way it would be printed.
的encodeString,编码字符向量将它打印方式。


举例----------Examples----------


pi
print(pi, digits = 16)
LETTERS[1:16]
print(LETTERS, quote = FALSE)

M <- cbind(I = 1, matrix(1:10000, ncol = 10,
                         dimnames = list(NULL, LETTERS[1:10])))
utils::head(M) # makes more sense than[使得更多的意义比]
print(M, max = 1000)# prints 90 rows and a message about omitting 910[打印90行和有关忽略910的消息]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。

你可能感兴趣的:(R语言,print函数,R语言)