Description Usage Arguments Details Value Note Author(s) See Also
Synchronize the tracking database to reflect new and/or deleted
objects. This function is intended to be called by a task callback so
that the tracking database automatically keeps up with new and deleted
objects. The appropriate task callback is installed by
track.start(..., auto = TRUE)
. If too much memory is occupied
by objects, excess objects are flushed from memory.
This function differs from track.rescan()
in that
track.rescan()
updates R view of the database to agree with
changes on disk, while track.sync()
is primarily intended to
go the other way (to make the disk database agree with R).
1 2 3 | track.sync(pos = 1, master=c("auto", "envir", "files"), envir = as.environment(pos),
trackingEnv = getTrackingEnv(envir), full = TRUE,
dryRun = FALSE, taskEnd = FALSE)
|
pos |
The search path position of the environment being tracked (default is 1 for the global environment) |
master |
What to treat as the master for the synchronization.
For a readonly tracked environment, the default |
envir |
The environment being tracked. This is an alternate way
(to the use of |
trackingEnv |
The environment that contains data for the tracking database. |
full |
If |
dryRun |
If |
taskEnd |
Should be |
Synchronizing the tracking database with the contents of the environment involves three tasks:
start tracking new untracked variables
for objects that have disappeared from the environment, delete them from the tracking database
check that all apparently tracked variables do in fact have an active binding
Currently, this function will not correctly handle the case where
master="files"
and where objects are cached and an underlying
file is changed.
Returns an invisible list with the following components:
new |
character vector of names of new variables |
removed |
character vector of names of variables that were removed |
The check that all apparently tracked variables have an active binding currently only checks that the variable has an active binding – there is no way (at the R level) to check that the active binding is the correct one.
Tony Plate <tplate@acm.org>
track.rescan
for rescanning a tracked database
after the files on disk have changed (this is usually only used for
tracked environment attached at a position 2 or greater.)
Overview and design of
the track
package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.