cached
Check whether targets are in the cache.
If no targets are specified with ...
or list
,
then cached()
lists
all the items in the drake cache.
Read/load a cached item with readd()
or
loadd()
.
cached(..., list = character(0), no_imported_objects = FALSE,
path = getwd(), search = TRUE, cache = NULL)
objects to load from the cache, as names (unquoted)
or character strings (quoted). Similar to ...
in
remove(...)
.
character vector naming objects to be loaded from the
cache. Similar to the list
argument of remove()
.
logical, applies only when
no targets are specified and a list of cached targets is returned.
If no_imported_objects
is TRUE
, then cached()
shows built targets (with commands) plus imported files,
ignoring imported objects. Otherwise, the full collection of
all cached objects will be listed. Since all your functions and
all their global variables are imported, the full list of
imported objects could get really cumbersome.
Root directory of the drake project,
or if search
is TRUE
, either the
project root or a subdirectory of the project.
Ignored if a cache
is supplied.
logical. If TRUE
, search parent directories
to find the nearest drake cache. Otherwise, look in the
current working directory only.
Ignored if a cache
is supplied.
drake cache. See new_cache()
.
If supplied, path
and search
are ignored.
Either a named logical indicating whether the given targets or cached or a character vector listing all cached items, depending on whether any targets are specified
# NOT RUN {
load_basic_example()
make(my_plan)
cached(list = 'reg1')
cached(no_imported_objects = TRUE)
cached()
# }
Run the code above in your browser using DataLab