| track.setup {trackObjs} | R Documentation |
Functions to setup and stop tracking.
track.start(dir, pos = 1, envir = as.environment(pos), create = TRUE,
clobber = c("no", "files", "variables"), cache=NULL, options=NULL,
RDataSuffix=NULL)
track.stop(pos = 1, envir = as.environment(pos), all=FALSE, stop.on.error=FALSE)
env.is.tracked(pos = 1, envir = as.environment(pos))
tracked.envs(envirs=search())
track.restart(pos = 1, envir = as.environment(pos), forget.modified = FALSE)
dir |
The directory where tracking data is stored |
pos |
The search path position of the environment being tracked (default is 1 for the global environment) |
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. |
create |
If TRUE, create the tracking directory if it
doesn't exist |
clobber |
Controls action taken when there are objects of the
same name in the
tracking directory and in envir: "no" means stop; "files" means use the
version from the tracking directory; and "variables" means
use the version in envir (and overwrite the version in the
tracking directory) |
cache |
Should objects be keep cached in memory? Default is FALSE. This option is a shorthand way of supplying options=list(cache=TRUE). |
options |
Option values (as a list) to be used for this tracking database. See track.options(). |
all |
If TRUE, all tracked environment are unlinked |
stop.on.error |
If FALSE, failures to unlink a tracking
environment are ignored, though a warning message is printed |
envirs |
A list or vector of objects that can be interpreted as
environments by as.environment |
forget.modified |
If TRUE, discard copies that are
modified and in memory |
RDataSuffix |
The suffix to use for RData files. This should not normally need to be specified. |
track.start:envir. If the
tracking directory already exists, objects in it will be made
accessible, otherwise it will be created (unless create=FALSE).track.stop:envir. Tracked
variables will become unavailable (any unsaved values will be
saved to files first.)track.restart:forget.modified==TRUE.
Variables that have disappeared from the tracking dir will disappear
from visibility, and variables added to the tracking dir will become
available.
track.start, track.stop, track.restart: |
all return invisible(NULL) (this
may change if it becomes clear what useful return values would be) |
env.is.tracked: |
returns TRUE or 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), it returns the subset of that vector that are tracked environments. |
Tony Plate <tplate@acm.org>
Overview and design of the trackObjs package.
library(trackObjs)
unlink("tmp1", recursive=TRUE)
track.start("tmp1")
track(x <- 33)
X <- array(1:24, dim=2:4)
track(X)
track(Y <- list(a=1:3,b=2))
X[2] <- -1
track.summary(time=0, access=1, size=FALSE)
env.is.tracked(pos=1)
env.is.tracked(pos=2)
ls(all=TRUE)
track.stop()
ls(all=TRUE)
track.start("tmp1")
ls(all=TRUE)
track.summary(time=0, access=1, size=FALSE)
track.stop()
unlink("tmp1", recursive=TRUE)