track.options(track)
track.options()所属R语言包:track
Set and get tracking options on a tracked environment
在跟踪环境中设置和跟踪选项
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Set and get tracking options on a tracked environment. Each tracked environment has its own set of tracking options exists which can be changed indpendently. Global default values can be set in options("global.track.options").
设置和跟踪选项跟踪的环境。每一个跟踪的跟踪选项存在可以改变indpendently的环境有自己的一套。全球默认值可以设置在options("global.track.options")。
用法----------Usage----------
track.options(..., pos = 1, envir = as.environment(pos),
values=list(...), save = FALSE, clear=FALSE, delete=FALSE,
trackingEnv, only.preprocess = FALSE, old.options = list())
参数----------Arguments----------
参数:...
Either option names as character data, or specifications for setting options as named arguments or in a named list. See DETAILS for descriptions of options.
任一选项为字符数据,或规范命名的参数设置选项,或在命名列表的名称。详情请参阅选项的说明。
参数:pos
The search path position of the environment being tracked (default is 1 for the global environment)
被跟踪的路径中的位置的环境(默认值是1对全球环境)
参数:envir
The environment being tracked. This is an alternate way (to the use of pos=) of specifying the environment being tracked, but should be rarely needed.
被跟踪的环境。这是一种备选的方式(使用pos=)被跟踪指定的环境,但应很少需要。
参数:values
A named list of option values to set. track.options(readonly=T) is equivalent to track.options(values=list(readonly=TRUE))
命名的选项列表值来设置。 track.options(readonly=T)是track.options(values=list(readonly=TRUE))的
参数:save
If TRUE, current options are saved to disk and will be used in future. Note that all current options settings are saved, not just the new settings made in this call.
TRUE如果,当前选项保存到磁盘,将用于在未来。请注意,目前所有的选项设置被保存,而不仅仅是新的设置,在这个调用。
参数:clear
If TRUE, and the option can have multiple values (e.g., autoTrackExcludeClass), the current values are cleared prior to using the supplied values. The default behavior, with clear=FALSE and delete=FALSE is to add supplied values to multi-valued options, and to replace the value for single-valued options.
如果TRUE,该选项可以有多个值(例如,autoTrackExcludeClass),当前值被清除之前所提供的值。默认的行为,clear=FALSE和delete=FALSE是提供的值添加到多值的选项,并取代单一值的选项的值。
参数:delete
If TRUE, and the option can have multiple values, the supplied values are removed from the current values (if they are not in the current values, they are silently ignored.)
如果TRUE,该选项可以有多个值时,所提供的值从当前值中删除(如果他们不是在当前值,他们静静地忽略掉。)
参数:trackingEnv
The hidden environment in which tracked objects are stored. It is not necessary to supply this in normal use.
隐藏的存储环境中,跟踪对象。这是没有必要提供此在正常使用。
参数:only.preprocess
If TRUE, process any options specifications and return the full list of option settings with the values as specified, and defaults for all othe roptions. Stored options are neither accessed nor changed. Intended for internal use.
如果TRUE,处理任何购股权规格和选项设置的值,默认为所有的行吟诗人roptions返回的完整列表。存储选项既不是访问,也没有改变。供内部使用。
参数:old.options
A list of old options to use, can only be suppled when only.preprocess=TRUE. Intended for internal use.
列表使用的旧选项,只能suppled的only.preprocess=TRUE。供内部使用。
Details
详细信息----------Details----------
Valid option names and values are as follows:
有效的选项名称和值如下:
alwaysCache: character (default ".Last"): vector of objects to always keep in memory. ".Last" is here to avoid
alwaysCache:字符(默认".Last"):向量的对象始终保持在内存中。 ".Last"是在这里,以避免
alwaysCacheClass: character (default "ff"): vector of classes whose objects are always kept in memory. "ff" is here by default because "ff" objects generally occupy only a small amount of memory, and flushing the object from memory causes unnecessary finalization calls on the external pointers in
alwaysCacheClass:字符(默认"ff"):向量类的对象始终保持在内存中。 "ff"是这里默认情况下,因为“"ff"对象一般只占用少量的内存,并刷新对象从内存中调用的外部指针会导致不必要的定稿
alwaysSaveSummary: logical (default TRUE) if TRUE, always save the summary on any change to the summary. Summaries are not saved
alwaysSaveSummary:逻辑(默认为true)如果为true,总是保存任何变化的总结总结。摘要不保存
autoTrackExcludeClass: character vector. Variables whose class is in this vector are not auto-tracked. The default is "RODBC", because variables of that class do not work
autoTrackExcludeClass:字符向量。变量的类是在此向量是不会自动跟踪。默认为"RODBC",因为这个类的变量不工作
autoTrackExcludePattern: character vector (default c("^\.track", "^\.required")) variables whose name matches any of these regular expressions are not
autoTrackExcludePattern:特征向量(默认的c("^\.track", "^\.required"))与任何这些正则表达式相匹配的变量,其名称是不
autoTrackFullSyncWait: (default -1) auto track will wait at least this many seconds between doing a full sync at the end of a top level task. If equal to zero, do a full sync at the end of each top level task. If less than zero, don't do a full sync.
autoTrackFullSyncWait:(默认为-1),自动跟踪,将等待至少在这么多秒之间的顶层任务结束时做了充分的同步。如果等于0,做一个完整的同步在每个顶级任务的结束。如果小于零,不这样做完全同步。
cache: logical (default TRUE): keep objects in memory?
缓存:逻辑(默认为true):保持内存中的对象呢?
cacheKeepFun: A function that specifies which objects to keep in memory at the end of a top-level-task. track.plugins for
cacheKeepFun:一个函数,它指定的对象在内存中保持一个顶层任务结束。 track.plugins为
cachePolicy: The higher-level policy to follow regarding keeping objects in memory. Currently has two possible values - one of them allows special action at the end of a top-level-task:
cachePolicy更高级别的政策遵循的保持内存中的对象。目前有两个可能的值 - 其中有一个允许专项行动结束时的顶级任务:
"none": No special action at end of task, i.e., follow option cache
"none":无专项行动的任务结束时,即遵循选项“cache
"eotPurge": Purge objects from memory at the end
"eotPurge":清除对象从内存结束时
Also affects when changes to objects are written to disk - see option
还影响对象的修改写入磁盘 - 请参阅选项
clobberVars: vector of string specifying variables to be
clobberVars:字符串指定变量的向量,是
compress: character or logical (default TRUE) passed to save(). Possible values are "none", "gzip", "xz", "bzip2". save() currently uses gzip by default (i.e., when compress=TRUE), which according to save() offers the best tradeoff of
压缩:字符或逻辑(默认TRUE)传递给save()。可能的值是"none","gzip","xz","bzip2"。 save()时,默认情况下,使用gzip(即compress=TRUE),其中根据save()的提供了最好的权衡
compression_level: numeric (default 1)
compression_level:数值(默认1)
debug: integer (default 0) if > 0, print some diagnostic debugging messages
调试:整数(默认为0)> 0,打印一些诊断调试消息
maintainSummary: logical (default TRUE) if TRUE, record time
maintainSummary:逻辑(默认为true)如果为true,记录时间
RDataSuffix: character (default "rda") suffix to use for files
RDataSuffix字符(默认"rda")使用的文件的后缀
readonly: logical (default TRUE for track.attach() and FALSE for track.start()) should any changes be allowed to the files? Note that this option is a function of how a tracking database is accessed – it is not a property of the database itself. A particular tracking database can attached on one R session with readonly=TRUE and at the same time be attached to another R session with readonly=FALSE. To
只读:逻辑(track.attach()FALSEtrack.start())的任何变更应被允许到文件的默认TRUE?请注意,此选项是如何跟踪访问数据库的功能 - 它不是数据库本身的属性。一个特定的跟踪数据库可以安装在一个R会话readonly=TRUE和在同一时间连接到另一个R会话readonly=FALSE。对
recordAccesses: logical (default TRUE) if TRUE, record
recordAccesses:逻辑(默认为true)如果为true,记录
summaryAccess: logical, or integer value 0,1,2,3,4; controls
summaryAccess:逻辑,或整数值0,1,2,3,4;控制
summaryTimes: logical, or integer value 0,1,2,3 (see
summaryTimes:逻辑,或整数值0,1,2,3(见
writeToDisk: logical (default TRUE): always write changed objects to disk? If TRUE, when objects are written to disk depends on cachePolicy: cachePolicy="none": write objects immediately on a change; cachePolicy="eotPurge": write changed objects at the end of a top-level task
writeToDisk:逻辑(默认为true):改变对象到磁盘写入吗?如果TRUE,当对象被写入到磁盘时,依赖于cachePolicy:cachePolicy="none":立即写对象上的变化,“cachePolicy="eotPurge":写更改的对象结束时的顶部级任务
The option settings are saved as a list in an object called .trackingOptions in the tracking environment (with a copy mirrored to a file in the tracking dir if save=TRUE.)
选项设置保存为一个列表中一个名为.trackingOptions“在的跟踪环境(副本镜像到一个文件中的跟踪目录。如果save=TRUE。”)的对象
The options can be used to tune performance to resource availability (time & memory) and robustness in the face of machine or user error. Some possible settings are:
资源可用性(时间和记忆体)和鲁棒性,在面对计算机或用户错误可以用于调整性能的选项。一些可能的设置有:
maximize robustness and speed: cache=TRUE and writeToDisk=TRUE (the default): always write an object to disk when it is changed, and keep a copy in memory, so that an object only needs
最大限度地提高鲁棒性和速度:cache=TRUE和writeToDisk=TRUE(默认值):始终对象写入到磁盘时,它被改变,并在内存中保留一份副本,这样一个对象就只需要
writeToDisk=TRUE, cache=FALSE: always write an object to disk when it is changed, and don't keep a copy in memory
writeToDisk=TRUE,cache=FALSE:总是写入到磁盘时,它被改变的对象,并没有在内存中保留一份
maximize speed: writeToDisk=FALSE, cache=TRUE: don't write the object to disk - just keep a copy in memory after it is first accessed and only write it when track.stop() or one of track.save() or its friends is called. This combination less robust because changed variables can be lost if R crashes, or the user quits R without remembering to call track.stop(). This mode of operation is like the g.data package, but with automatically keeping track of which variables have been changed and need to be written to disk (and the writing of changed variables with one call to
最大限度地提高速度:writeToDisk=FALSE,cache=TRUE:不写入到磁盘的对象 - 只是在内存中保留一份副本,这是第一次访问后,只写它的时候track.stop()或track.save()或称为它的朋友们。这样的组合不太可靠,因为改变的变量可能会丢失,如果R崩溃,或,用户退出R无记忆调用“track.stop()。这种操作模式是一样g.data包,但带有自动跟踪的变量已被更改,需要被写入到磁盘(写作改变的变量调用一次
The combination writeToDisk=FALSE and cache=FALSE is possible, but is unlikely to be desirable – this will keep changed objects in memory, but will not keep merely fetched objects in memory.
结合writeToDisk=FALSE和cache=FALSE是可能的,但不可能是可取的 - 这将让改变内存中的对象,但不会只取内存中的对象。
The options maintainSummary, recordAccesses, and alwaysSaveSummary control when the object summary is updated and when it is saved to disk (the default is for it to be updated and saved to disk for every read and write access to an object, whether or not the object is cached in memory).
的选项maintainSummary,recordAccesses和alwaysSaveSummary控制对象时,更新摘要,当它被保存到磁盘(默认情况下是被更新,并保存到磁盘上的每个读和写入访问的对象,不论对象是在内存中缓存)。
Global default values can be set in options("global.track.options") as a list like options(global.track.options=list(cache=TRUE, cachePolicy='tltPurge')).
全球默认值可以设置在options("global.track.options")一个列表,如options(global.track.options=list(cache=TRUE, cachePolicy='tltPurge'))。
值----------Value----------
The value returned is a list of option values. If options were specified as arguments, the old values of those options are returned (unless only.preprocess=TRUE was supplied). If no options were specified as arguments, the full list of current option values is returned.
返回的值是一个列表的选项值。如果指定的选项,这些选项将返回旧的值作为参数(除非only.preprocess=TRUE提供)。如果没有指定的选项的完整列表,当前选项值作为参数,则返回。
Cache插件功能----------Cache plugin functions----------
track contains an experimental feature that allows users to supply their own plugin functions that specify cache rules. Currently, the plugin function can specify whether or not an object will be flushed from memory at the end of a top-level command. See track.plugins for further info.
track包含了一个实验性的功能,可以让用户提供他们自己的插件功能,指定高速缓存规则。目前,这个插件功能,可以指定是否或不是对象从内存中的顶级命令结束时,将被刷新。进一步信息见track.plugins。
(作者)----------Author(s)----------
Tony Plate <tplate@acm.org>
参见----------See Also----------
Overview and design of the track package. See
track包的概述和设计。看
实例----------Examples----------
library(track)
unlink("tmp1", recursive=TRUE)
track.start("tmp1")
x <- 33
X <- array(1:24, dim=2:4)
track.status()
track.options(cache=TRUE, writeToDisk=FALSE) # change for just this session[改变只是这届]
# different ways of retrieving option values[不同的方式检索选项值]
track.options(c("cache", "writeToDisk"))
track.options("cache", "writeToDisk")
track.options("cache")
track.options()
# see the effect of the changed options on the status of X (X is not saved to disk)[看到效果,更改的选项的状态的X(X不保存到磁盘)]
track.status()
X[1,1,1] <- 0
track.status()
track.flush()
track.status()
track.stop(pos=1)
track.start("tmp1")
# note that options previously changed are back at defaults (because default[注意,以前更改的选项的默认值(因为默认]
# to track.options() is save=FALSE[track.options()保存= FALSE]
track.options(c("cache", "writeToDisk"))
track.options(cache=TRUE, writeToDisk=FALSE, save=TRUE) # change the options on disk[更改磁盘上的选项]
track.options(c("cache", "writeToDisk"))
track.stop(pos=1)
track.start("tmp1")
# now options previously changed are remembered (because track.options(..., save=TRUE) was used)[以前更改的选项被记住(,因为track.options(...,节省= TRUE)使用)]
track.options(c("cache", "writeToDisk"))
track.stop(pos=1)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|