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 <NA> is printed.
NA的是打印默认打印NA(不带引号),除非这是一个字符NA和quote =     FALSE时<NA>印。

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:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提供的源码资源涵盖了小程序应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 适合毕业设计、课程设计作业。这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。 所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值