找回密码
 注册
查看: 2066|回复: 0

R语言:deparseOpts()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 18:17:45 | 显示全部楼层 |阅读模式
deparseOpts(base)
deparseOpts()所属R语言包:base

                                        Options for Expression Deparsing
                                         选项表达Deparsing的

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

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

Process the deparsing options for deparse, dput and dump.
处理deparse,dput和dumpdeparsing选项。


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


.deparseOpts(control)



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

参数:control
character vector of deparsing options.
字符向量deparsing期权。


Details

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

This is called by deparse, dput and dump to process their control argument.
这就是所谓的deparse,dput和dump处理control参数。

The control argument is a vector containing zero or more of the following strings.  Partial string matching is used.
control参数是一个向量,包含零个或多个下列字符串。部分字符串匹配使用。

Either surround integer vectors by as.integer() or use suffix L, so they are not converted to type double when parsed.  This includes making sure that integer NAs are preserved (via NA_integer_ if there are no non-NA values in the vector, unless "S_compatible" is set).
要么as.integer()环绕的整数向量或使用后缀L,所以他们不转换为double类型时解析。这包括确保该整数NAs的保存(通过NA_integer_如果有没有非NA值的向量,除非"S_compatible"设置)。

Surround expressions with quote(), so they are not evaluated when re-parsed.
环绕quote()表达式,所以他们没有评估时重新解析。

If the object has attributes (other than a source attribute), use structure() to display them as well as the object value.  This is the default for deparse and dput.
如果对象具有属性(source属性以外),使用structure()以及显示对象的值。这是默认的deparse和dput。

If the object has a source attribute, display that instead of deparsing the object.  Currently only applies to function definitions.
如果对象有一个source属性,显示的对象,而不是deparsing。目前只适用于函数定义。

Some exotic objects such as environments, external pointers, etc. can not be deparsed properly.  This option causes a warning to be issued if the deparser recognizes one of these situations.
一些异国情调的对象,如环境,外部指针等不能正确deparsed。此选项会导致发出警告,如果deparser承认这些情况之一。

Also, the parser in R < 2.7.0 would only accept strings of up to 8192 bytes, and this option gives a warning for longer strings.
此外,在R <2.7.0解析器将只接受高达8192字节的字符串,此选项给出了一个较长的字符串警告。

Integer, real and character NAs are surrounded by coercion where necessary to ensure that they are parsed to the same type.
整数,实数和字符NA的强制包围在必要时,以确保它们被解析到同一类型的。

An abbreviated way to specify all of the options listed above.  This is the default for dump, and the options used by edit (which are fixed).
缩写的方式来指定所有上面列出的选项。这是默认为dump,edit使用的选项(固定)。

Deparse promises in the form <promise: expression> rather than evaluating them.  The value and the environment of the promise will not be shown and the deparsed code cannot be sourced.
deparse承诺形式<promise: expression>而非评估他们。的价值和对环境的承诺将不会被显示和deparsed不能源代码。

Make deparsing as far as possible compatible with S and R < 2.5.0. For compatibility with S, integer values of double vectors are deparsed with a trailing decimal point.  Backticks are not used.
请deparsing尽可能与S和R <2.5.0兼容。与S兼容,双向量整型值deparsed的尾随小数点。不使用反引号。

For the most readable (but perhaps incomplete) display, use control = NULL. This displays the object's value, but not its attributes.  The default in deparse is to display the attributes as well, but not to use any of the other options to make the result parseable.  (dput and dump do use more default options, and printing of functions without sources uses c("keepInteger", "keepNA").)
最可读的(但可能不完全)的显示,使用control = NULL。这显示该对象的值,而不是它的属性。默认的中deparse以及显示属性,但不使用任何其他选项,以使解析的结果。 (dput和dump不使用无来源的默认选项,打印功能使用c("keepInteger", "keepNA")。)

Using control = "all" comes closest to making deparse() an inverse of parse().  However, not all objects are deparse-able even with this option.  A warning will be issued if the function recognizes that it is being asked to do the impossible.
使用control = "all"最接近使deparse()parse()的逆。然而,并非所有的对象都是可以deparse与此选项。会发出警告,如果该函数承认,它正在要求做不可能的事。


值----------Value----------

A numerical value corresponding to the options selected.
相应的选项中选择一个数值。

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


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

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-23 14:55 , Processed in 0.024201 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表