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

R语言 SOAR包 SOAR-package()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 11:21:30 | 显示全部楼层 |阅读模式
SOAR-package(SOAR)
SOAR-package()所属R语言包:SOAR

                                         SOAR: Utility functions for memory management
                                         SOAR:实用的内存管理功能

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

----------Description----------

This suite of functions has two distinct purposes:
这间套房的功能有两种不同的用途:

To provide an easy mechanism to store objects on the disc, releasing memory during the R session, but in such a way as to keep them visible on the search path and automatically loaded into memory if and when they are needed, and
为了提供一个简单的机制,将对象存储在光盘上,释放内存在R会议,但以这样的方式,让他们在搜索路径中可见,并自动加载到内存中,如果当他们需要,并

To allow objects to be made automatically available to multiple R sessions, possibly for testing prior to including them in formal packages.
为了让对象自动进行多个R会议,可能测试之前,他们在正式的包。


Details

详细信息----------Details----------

The function Store is used to take objects from memory and store them as .RData files, usually in a sub-directory of the current working directory we call a stored object cache.  The directory is automatically created if required.  The search path is augmented to contain an entry that mirrors the stored object cache, in the sense that if an object in the cache is required in future it is loaded into memory by the same lazy loading mechanism as is used in packages.
函数Store用于拍摄对象从内存.RData文件,并将其储存,通常在当前的工作目录中,我们调用一个存储对象缓存子目录。如果需要的话,该目录被自动创建。增强的搜索路径包含一个条目,反映了存储对象的缓存,在这个意义上,如果需要在未来的高速缓存中的对象,它被加载到内存中相同的延迟加载机制中所使用的包。

An established stored object cache may be added to, or re-positioned on, the search path by the function Attach, and the function Objects (alias: Ls) may be used to display the objects currently held in a stored object cache.
可以添加到一个已建立的存储对象高速缓存,或重新定位,搜索路径的功能Attach,和功能Objects(别名:Ls)可以用来显示目前被关押在一个存储对象高速缓存的对象。

Objects may be removed from the stored object cache using the function Remove.
对象可以从存储的对象缓存使用的功能Remove。

Any of the functions Store, Objects or Remove will silently attach existing stored object caches to the search path as required.
任何功能Store,Objects或Remove会悄悄地连接现有的存储对象缓存的搜索路径。

Variants on the four basic functions with “Data” or “Utils” in their names, such as StoreUtils or ObjectsData differ from the corresponding basic version only in the way that their default argument values are defined.  The intention is to make it possible either to add to a local stored object cache or to a central stored object cache for data or utulity functions in a simple way.
变体的四项基本职能上与“Data”或“Utils”在他们的名字,如StoreUtils或ObjectsData不同,相应的基本版本的方式定义自己的默认参数值。其目的是它可以添加到本地存储的对象缓存到一个中央存储对象的缓存为的数据或utulity功能在一个简单的方法。

A function Search is also provided to show items on the search together with their lib.loc directories, as appropriate.
的功能Search还提供了显示lib.loc的相应的目录中搜索项目。


(作者)----------Author(s)----------



Bill Venables, borrowing heavily from David Brahm's package <span class="pkg">g.data</span>.

Maintainer: Bill Venables, <a href="mailto:Bill.Venables@CSIRO.au">Bill.Venables@CSIRO.au</a>.




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

pp 11&ndash;12.  (Contains a brief discussion of the antecedent package, <code>g.data</code>.)

实例----------Examples----------


## change default cache, keeping any previous setting[#更改默认的缓存,保持所有以前的设置]
oldLC <- Sys.getenv("R_LOCAL_CACHE", unset = ".R_Cache")
Sys.setenv(R_LOCAL_CACHE=".R_Test")

## generate some dummy data[#生成一些虚拟的数据。]
dummy <- rnorm(100)
mn <- mean(dummy)
va <- var(dummy)

Attach()                            # may give warning[可能会发出警告]

## store it in the stored object cache[#存储中存储的对象缓存]
Store(dummy, mn, va)
Search()

Attach(pos=3)                       # change to pos=3[]
Search()

Objects()
Remove(mn, va)
Objects()
Remove(Objects())                   # empty the cache[清空缓存]

detach(".R_Test")                   # remove from search path[从搜索路径中删除]
Sys.setenv(R_LOCAL_CACHE=oldLC)     # restore normal default[恢复正常默认]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-9 03:48 , Processed in 0.024977 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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