pos on the search path.track.attach(dir, pos = 2, name = NULL,
create = FALSE, readonly = !create,
lockEnv = FALSE, verbose = TRUE, auto = NULL)
track.detach(pos = NULL, name = NULL, detach = TRUE)pos=1 in the search
path) cannot be tracked in a readonly mode.FALSE because locking the
environment is irreversible, and it prevents rescanning or caching
(because can't delete or add bindings)TRUE, the environment attached to the search
path (in a position other than 2) will be detached after stopping
tracking, IF it was created by track.attach() and if there are no
variables left remaining in the environmtrack.start).track.attach attaches a new environment to the search path at the specified
position and variables in the tracking database are made available in
it through lazy loading. Using readonly==TRUE ensure that no
changes at all are made to the tracking database, and the environment
is locked to ensure that variables cannot be created or deleted.
track.detach syncs all variables to files and detaches the
environment from the search list if it is empty. See
track.stop for conditions under which the
environment may not be detached.track.starttrack.attach("path/to/tracking-database", pos=2, name="trackdb")
track.detach(pos=2)Run the code above in your browser using DataLab