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

R语言 trackObjs包 track.future()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 11:17:40 | 显示全部楼层 |阅读模式
track.future(trackObjs)
track.future()所属R语言包:trackObjs

                                        Potential future features of the trackObjs package
                                         潜在的未来的功能的trackObjs包

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

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

Potential future features of the trackObjs package, in some vague order of feasibility and priority ('easy', 'medium' and 'hard' are an estimate of design and coding difficulty):
潜在的未来的功能的trackObjs包,在一些模糊的可行性和优先顺序(“容易”,“中等”和“硬”的设计和编码困难的估计):

  


untracked variables in the summaryeasy) would this be useful? wouldn't need to cache these, mark with an asterisk in a special column?
摘要:不露痕迹的变量(容易)这是有用的?就不需要缓存这些,一个特殊的列中的星号标记吗?

other default tracked environmenteasy) would it be useful to allow an environment other than the global environment to be the default tracking environment?  This could be implemented by using options("tracked.environment") as the default environment for all the tracking functions (rather than the currently hardcoded pos=1)
其他默认跟踪的环境:(容易)会是有益的,允许全球环境是默认的跟踪环境以外的环境吗?这可以通过以下来实现使用options("tracked.environment")作为默认的环境,可用于所有的跟踪功能(而不是目前的硬编码的位置= 1)

better cleanupeasy) provide an integrated quiting function that saves all tracked vars and history before quitting (and maybe also saves untracked vars in an RData file)
更好的清理:(容易)提供一个的集成quiting功能,保存所有跟踪的变量和历史,在退出之前(也许还有一个RDATA文件中保存不露痕迹的瓦尔)

caching ruleshard) allow rule-based decisions for caching, e.g., only cache objects under a certain size, or only cache objects of certain classes, or enforce a limit on memory for caching tracked variables, and flush out least-recently used variables
缓存规则(硬)允许缓存,例如,只有具有一定规模下的缓存对象,或只有某些类别的缓存对象的规则为基础的决策,或强制执行限制内存缓存跟踪的变量,并刷新了最近最少使用变量

auto-trust in rebuildeasy) when rebuilding an active tracking environment, base decision whether to use summary row from file or environment on which has more recent dates in it. (whole dataframe, or row by row?)
自动重建信任:(容易)重建时,主动跟踪环境,碱基决定是否使用汇总行从文件或环境上有更近的日期。 (整个数据框,或行的行吗?)

smarter reading of filemap.txtmedium) check the mod time on filemap.txt when getting the filemap obj, and if the file on disk appears to have changed, reread it instead of just getting it from memory.  This would allow working together better with other sessions that are simultaneously using this tracking dir.  Don't know how much it would slow things down – do some timings.  Note that to make this work in a fool-proof manner would require locks.
聪明的阅读的filemap.txt:(中)检查模时间filemap.txt时,得到的filemap OBJ,如果磁盘上的文件发生了变化,重读,而不是仅仅得到它从内存中。这将允许一起工作更好地与其他会话,同时使用这种跟踪目录。不知道多少,它会慢下来的东西 - 做一些计时。请注意,为了使这项工作在一个很简单的方式就需要锁。

investigate double-get: doing subset-replacement (e.g., X[2] <- ...) retrieves X twice (see example below)
调查一倍:做子集替换(例如,X[2] <- ...)检索X两倍(见下面的例子)

readonly modehard) to allow linking tracking dirs that might be in use by other R processes &ndash; would require not recording gets &ndash; this would require adding a new env on the search path and tracking it
只读模式:允许连接可能会在的其他研发过程中使用的跟踪显示目录(硬) - 将需要不记录得到 - 这将需要添加一个新的包膜上的搜索路径和跟踪

autoflushhard) automatic flushing of variables that haven't been used frequently (triggered automaticall when memory runs low?) &ndash; this is why the summary records fetches as well as writes
自动刷新:(硬)自动冲洗的变量没有被经常使用(内存不足时触发automaticall?) - 这就是为什么简要记录提取以及写入

safer restartmedium) check that we will be able to restart before doing the stop (check for masked variables or other potential clobber problems)
更安全的重新启动(中)检查,我们将能够重新启动之前做站(检查蒙面变量或其他潜在的乱码问题)

safe saveshard) write files in a safe way so that the original file is not removed until the new file is written &ndash; not sure if this is necessary, because objects are in memory, and can be rewritten if there is a failure
安全保存:(硬盘)写入文件以安全的方式使原有的文件不会删除,直到写入新文件 - 不知道这是必要的,因为对象在内存中,并且可以重写,如果有一个故障

autotrack:(hard) automatically track new variables? (would require hooks in base-R that get called when a new var is created)   
自动跟踪:(硬盘)自动跟踪新的变数? (这需要BASE-R的钩子被调用时创建一个新的var)

Example of the "double-get" when assigning a subset (using the example from the help page for makeActiveBinding).  Note that it works correctly, but retrieving the object twice seems unneccessary and could be slow with very large objects.
例如,“双”时,分配一个子集(例如,从makeActiveBinding)的帮助页面。需要注意的是它能够正常工作,但两次检索的对象似乎是不必要的和非常大的对象可能是缓慢的。

<pre> > f <- local( { +     x <- 1 +     function(v) { +        if (missing(v)) +    cat("get\n") +        else { +    cat("set\n") +    x <<- v +        } +        x +     } + }) > makeActiveBinding("X", f, .GlobalEnv) NULL > bindingIsActive("X", .GlobalEnv) [1] TRUE > X get [1] 1 > X <- 2 set > X get [1] 2 >  > X[1] get [1] 2 > X[2] <- 1 # 'X' is fetched twice get get set > X get [1] 2 1 > </pre>
<RE>> < - 本地({+ X  -  1 +功能(V){+ +猫(失踪(V))(“\ n”)+其他{+猫(“集\ N“)+ X <<  -  V +} + X +} +})> makeActiveBinding(”X“,F,GlobalEnv)(”X“,NULL> bindingIsActive。GlobalEnv)[1] TRUE> X GET [1] 1> X < -  2集> X [1] 2 >> X [1] [1] 2> X [2] < -  1#X被取两次获得集> X [1] 2 1> </ pre>


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

Overview and design of the trackObjs package.
trackObjs包的概述和设计。


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


# Example (transcript shown above) of how subset-assignment[如上图所示的实例(副本)的子集分配]
# results in two retrievals when the object is an active binding.[结果在两个检索时,该对象是一个活性结合。]
f <- local( {
    x <- 1
    function(v) {
       if (missing(v)) {
           cat("get\n")
       } else {
           cat("set\n")
           x <<- v
       }
       x
    }
})
makeActiveBinding("X", f, .GlobalEnv)
bindingIsActive("X", .GlobalEnv)
X
X <- 2
X
X[1]
X[2] &lt;- 1 # 'X' is fetched twice[X取两次]
X

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 12:34 , Processed in 0.023145 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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