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

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

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

                                        Return filenames and directories for tracked variables.
                                         返回文件名和目录,跟踪的变量。

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

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

Return filenames and directories for tracked variables.
返回文件名和目录,跟踪的变量。


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


track.filename(expr, list = character(0), pos = 1, envir = as.environment(pos), suffix = FALSE)
track.datadir(pos = 1, envir = as.environment(pos), relative = TRUE)
track.info(pos = 1, envir = as.environment(pos), all=TRUE)
env.is.tracked(pos = 1, envir = as.environment(pos))
tracked.envs(envirs=search())



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

参数:expr
An unquoted variable name  
一个非上市的变量名


参数:list
A character vector of variable names  
字符向量的变量名


参数: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=)被跟踪指定的环境,但应很少需要。


参数:suffix
: Return the filename with the RData suffix (extension) (taken from track.options("RDataSuffix"))
:返回文件名的RDATA后缀(扩展名)(从track.options("RDataSuffix")采取)


参数:relative
: Return a path relative to the current working directory, or an absolute path?
:返回到当前的工作目录的相对路径或绝对路径?


参数:all
Return info about all tracked environments?
返回所有跟踪的环境的信息?


参数:envirs
A list or vector of objects that can be interpreted as environments by as.environment
列表或矢量对象,可以理解为环境,as.environment


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




track.filename()  returns the filenames for tracked variables.
track.filename()返回的文件名跟踪的变量。




track.datadir()  returns the directory in which RData files
track.datadir()返回的目录中RDATA文件




track.info:  returns a dataframe of information about
track.info:返回一个数据框的信息




env.is.tracked: returns TRUE or FALSE
env.is.tracked:返回TRUE或FALSE




tracked.envs: with no arguments, it returns the names of tracked environment that are on the search list.  If given an argument that is a vector of environments (or environment names),
tracked.envs不带参数,它返回跟踪的环境,在搜索列表的名称。如果给定一个参数是一个向量的环境(环境名称),


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

The track package stores RData files in the directory returned by track.datadir().  It is not advisable to write other RData files to that directory.  Filenames for variables may change when an object is deleted and then recreated.
返回tracktrack.datadir()包店RDATA目录中的文件。写其他的RDATA文件到该目录,这是不可取的。文件名的变量时,可能会改变一个对象被删除,然后重新创建。

A warning message like "env R_GlobalEnv (pos 1 on search list) appears to be an inactive tracked environment, saved from another session and loaded here inappropriately" indicates that the environment has some but not all of the structure of a tracked environment.  In particular, the variable .trackingEnv exists in it, but does not seem to be connected properly.  Some of the bindings may be active bindings, but they may have come disconnected from the tracking environment.  The most common way that this kind of situation can arise is from doing save.image() before track.stop(), and then reloading the saved image (e.g., when restarting R). To fix this situation, do the following:
“,:ENV R_GlobalEnv(在搜索列表中的位置1),似乎是一个非履带式环境,从另一个会话保存和加载在这里不恰当的”一条警告消息表明,环境中有一些,但不是所有的跟踪环境的结构。特别是,变量.trackingEnv它的存在,但似乎并没有被正确连接。一些绑定可以是主动的绑定,但他们可能来断开从跟踪环境。这种情况下可能会出现的最常见的方式,是从做save.image()前track.stop(),然后重新加载保存的图像(例如,当重新启动R)。为了解决这种情况,请执行以下操作:

rm(.trackingEnv, pos=1)
rm(.trackingEnv, pos=1)

names(which(!sapply(ls(pos=1), bindingIsActive,       as.environment(1)))) # to see which variables have active bindings
names(which(!sapply(ls(pos=1), bindingIsActive,       as.environment(1))))#看哪些变量绑定的

x1 <- x # for each variable x that has an active binding and that you want to save
x1 <- x#为每个变量x,有一个活跃的绑定,你要保存

rm(x, pos=1)
rm(x, pos=1)

save.image() # to overwrite the old saved .RData file (only works with position 1)
save.image()#覆盖旧的保存。的RDATA文件(仅适用于位置1)

If the inactive tracked environment is at a position other than 1 on the search list, substitute the appropriate position for 1 in the above.
如果非活动跟踪环境是1以外的位置处的搜索列表上,替代适当的位置,在上述1。


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


Tony Plate <a href="mailto:tplate@acm.org">tplate@acm.org</a>



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

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


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


library(track)
unlink("tmp1", recursive=TRUE)
track.start("tmp1")
x <- 33
X <- array(1:24, dim=2:4)
Y <- list(a=1:3,b=2)
X[2] <- -1
track.datadir(relative=TRUE)
track.filename(list=c("x", "X"))
env.is.tracked(pos=1)
env.is.tracked(pos=2)
track.stop(pos=1)
unlink("tmp1", recursive=TRUE)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 10:51 , Processed in 0.021245 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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