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

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

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

                                        Text Representations of R Objects
                                         R对象的文本表示

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

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

This function takes a vector of names of R objects and produces text representations of the objects on a file or connection. A dump file can usually be sourced into another R (or S) session.
这个函数接受一个向量R对象的名称和生产上的文件或连接对象的文本表示。一个dump文件通常是sourceD到另一个R(或)会议。


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


dump(list, file = "dumpdata.R", append = FALSE,
     control = "all", envir = parent.frame(), evaluate = TRUE)



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

参数:list
character.  The names of one or more R objects to be dumped.
字符。倾倒的一个或多个R对象的名称。


参数:file
either a character string naming a file or a connection.  "" indicates output to the console.
无论是一个字符串,命名一个文件或一个连接。 ""表示输出到控制台。


参数:append
if TRUE and file is a character string, output will be appended to file; otherwise, it will overwrite the contents of file.
如果TRUE和file是一个字符串,输出将被附加到file,否则,它会覆盖file的内容。


参数:control
character vector indicating deparsing options. See .deparseOpts for their description.
特征向量表示deparsing选项。看到.deparseOpts他们的描述。


参数:envir
the environment to search for objects.
搜索对象的环境。


参数:evaluate
logical.  Should promises be evaluated?
逻辑。应承诺进行评估?


Details

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

If some of the objects named do not exist (in scope), they are omitted, with a warning.  If file is a file and no objects exist then no file is created.
如果一些不存在(范围)命名的对象,他们都被省略,警告。如果file是一个文件,没有对象存在,则没有文件被创建。

sourceing may not produce an identical copy of dumped objects.  A warning is issued if it is likely that problems will arise, for example when dumping exotic or complex objects (see the Note).
sourceING可能不会产生一个dump编辑对象完全相同的副本。如果它很可能会出现问题例如,当倾倒外来的或复杂的对象(见注),将发出警告。

dump will also warn if fewer characters were written to a file than expected, which may indicate a full or corrupt file system.
dump也警告说,如果写更少的字符比预期的文件,这可能预示着一个完整的或损坏的文件系统。

A dump file can be sourced into another R (or perhaps S) session, but the function save is designed to be used for transporting R data, and will work with R objects that dump does not handle.
可以是一个dump文件sourceD到另一个R(或可能)会议,但功能save被设计用于运送R数据,将R对象dump不处理。

To produce a more readable representation of an object, use control = NULL.  This will skip attributes, and will make other simplifications that make source less likely to produce an identical copy.  See deparse for details.
产生一个更可读的对象表示,使用control = NULL。这将跳过属性,将其它使source不太可能产生一个相同的副本的简化。看到deparse详情。

To deparse the internal representation of a function rather than displaying the saved source, use control = c("keepInteger",     "warnIncomplete", "keepNA").  This will lose all formatting and comments, but may be useful in those cases where the saved source is no longer correct.
到deparse比显示保存的源函数的内部表示,而是用control = c("keepInteger",     "warnIncomplete", "keepNA")。这将失去所有的格式和意见,但可能是在这种情况下非常有用,其中保存的源不再是正确的。

Promises will normally only be encountered by users as a result of lazy-loading (when the default evaluate = TRUE is essential) and after the use of delayedAssign, when evaluate = FALSE might be intended.
承诺将通常只被用户遇到的一个延迟加载的结果(默认evaluate = TRUE是必不可少的),使用后delayedAssign时evaluate = FALSE可能打算。


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

An invisible character vector containing the names of the objects which were dumped.
一种无形的特征向量包含被倾倒的对象的名称。


注意----------Note----------

As dump is defined in the base namespace, the base package will be searched before the global environment unless dump is called from the top level prompt or the envir argument is given explicitly.
dump基地命名空间中定义,除非base从高层提示或dump的调用之前将全球环境搜查envir包参数给出明确。

To avoid the risk of a source attribute becoming out of sync with the actual function definition, the source attribute of a function will never be dumped as an attribute.
源属性的函数,以避免成为与实际的功能定义同步源属性的风险,将永远不会被弃置作为一个属性。

Currently environments, external pointers, weak references and objects of type S4 are not deparsed in a way that can be sourced.  In addition, language objects are deparsed in a simple way whatever the value of control, and this includes not dumping their attributes (which will result in a warning).
目前的环境,外部指针,弱引用和对象的类型S4不deparsed的方式可以是sourceD。此外,语言对象deparsed在一个简单的方法无论control价值,这不仅包括倾销他们的属性(这将导致一个警告)。


参考文献----------References----------

The New S Language. Wadsworth & Brooks/Cole.

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

dput, dget, write.<br> save for a more reliable way to save R objects.
dput,dget,write。参考save一个更可靠的方式来保存R对象。


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


x <- 1; y <- 1:10
dump(ls(pattern = '^[xyz]'), "xyz.Rdmped")
print(.Last.value)
unlink("xyz.Rdmped")

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-22 21:39 , Processed in 0.032811 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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