track(expr, pos = 1, envir = as.environment(pos), list = NULL,
pattern = NULL, glob = NULL, exclude = TRUE)
track.assign(x, value, pos = 1, envir = as.environment(pos), flush = TRUE)
untrack(expr, pos = 1, envir = as.environment(pos), list = NULL,
pattern = NULL, glob = NULL, all = FALSE, keep.in.db = FALSE)
track.remove(expr, pos = 1, envir = as.environment(pos), list = NULL,
pattern = NULL, glob = NULL, all = FALSE, force = TRUE)
track.save(expr, pos = 1, envir = as.environment(pos), list = NULL,
pattern = NULL, glob = NULL,
all = missing(expr) && missing(list) && missing(pattern) && missing(glob))
track.resave(expr, pos = 1, envir = as.environment(pos), list = NULL,
pattern = NULL, glob = NULL,
all = missing(expr) && missing(list) && missing(pattern) && missing(glob))
track.flush(expr, pos = 1, envir = as.environment(pos), list = NULL,
pattern = NULL, glob = NULL,
all = missing(expr) && missing(list) && missing(pattern) && missing(glob),
force = FALSE)
track.forget(expr, pos = 1, envir = as.environment(pos), list = NULL,
pattern = NULL, glob = NULL, all = FALSE)
track.load(files, pos = 1, envir = as.environment(pos), list = NULL,
pattern = NULL, glob = NULL, cache = FALSE, clobber = FALSE,
time.of.file = TRUE, warn = TRUE)pos=)
of specifying the environment being tracked, but should be rarely needed.TRUE, operate upon all elegible variables. The
default is FALSE for functions that can change data, and
TRUE for functions that merely control whether data is in
memory or file or both.autoTrackExcludePattern option value. If exclude==TRUE (the default),
exclude variables that match. If TRUE, the variable is left in the
tracking database, though the link to it is broken (it becomes masked)save())TRUE or FALSE indicating whether to keep the tracked
object cached in memoryTRUE or FALSE indicating whether to
overwrite existing objects of the same nameTRUE, for track.remove remove orphaned
tracked variables; for track.flush flush out variables that
would normally be kept in cache.TRUE, use the access times on the file
to populate the access time fields in the tracking summary.TRUE, issue warnings about object not acted
upon.loaded: names of objects that were loaded fromfileskipped: names of objects infilethat
were not loadedtrack: start tracking the specified variablestrack.assign: assign a value to a variable (start
tracking variable if it is not already tracked.) Optionally flush the
value out of memory.untrack: stop tracking the specified variables, leaving the object inenvirso that it can
still be used. Ifkeep.in.db=TRUE, the variable is left
in the tracking environment (but is masked), ifkeep.in.db=FALSE(the default),
all trace of the variable is completely removed from the tracking
environment.track.remove: completely remove all
traces of a tracked variable (also removes untracked variables)track.save: write unsaved variables to disktrack.flush: write unsaved variables to disk, and remove from memorytrack.forget: delete cached
versions without saving to file (file version will be retrieved next
time the variable is accessed)track.rescan: reload variable
values from disk (can forget all cached vars, remove no-longer existing tracked vars)track.load: load variables from a
saved RData file into the tracking session - iflistis
supplied, only these variables are loaded in. Already existing
variables will be skipped and not overwritten unlessclobber=TRUEis supplied.expr (a variable name, unquoted) or list (character
vector containing names of variables), or by regular expression pattern
or shell pattern glob. If no specification is given, all
variables are acted upon.track package.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.summary(time=0, access=1, size=FALSE)
y1 <- 2
y2 <- 3
z1 <- 4
z2 <- 5
z3 <- 6
untracked()
track.summary(time=0, access=1, size=FALSE)
ls(all=TRUE)
track.stop(pos=1)
ls(all=TRUE)
a <- 7
b <- 8
save(list=c("a", "b"), file="ab.rda")
remove(list=c("a", "b"))
track.start("tmp1")
track.summary(time=0, access=1, size=FALSE)
track.load("ab.rda")
track.summary(time=0, access=1, size=FALSE)
track.status()
track.stop(pos=1)
unlink("tmp1", recursive=TRUE)Run the code above in your browser using DataLab