drake (version 7.3.0)

cached: List targets in the cache.

Description

Tip: read/load a cached item with readd() or loadd().

Usage

cached(..., list = character(0), no_imported_objects = FALSE,
  path = getwd(), search = TRUE, cache = NULL, verbose = 1L,
  namespace = NULL, jobs = 1, targets_only = TRUE)

Arguments

...

Deprecated. Do not use. Objects to load from the cache, as names (unquoted) or character strings (quoted). Similar to ... in remove().

list

Deprecated. Do not use. Character vector naming objects to be loaded from the cache. Similar to the list argument of remove().

no_imported_objects

Logical, deprecated. Use targets_only instead.

path

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.

search

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.

cache

drake cache. See new_cache(). If supplied, path and search are ignored.

verbose

Integer, control printing to the console/terminal.

  • 0: print nothing.

  • 1: print targets, retries, and failures.

  • 2: also show a spinner when preprocessing tasks are underway.

namespace

Character scalar, name of the storr namespace to use for listing objects.

jobs

Number of jobs/workers for parallel processing.

targets_only

Logical. If TRUE just list the targets. If FALSE, list files and imported objects too.

Value

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.

See Also

readd(), loadd(), drake_plan(), make()

Examples

Run this code
# NOT RUN {
isolate_example("Quarantine side effects.", {
if (suppressWarnings(require("knitr"))) {
if (requireNamespace("lubridate")) {
load_mtcars_example() # Load drake's canonical example.
make(my_plan) # Run the project, build all the targets.
cached()
cached(targets_only = FALSE)
}
}
})
# }

Run the code above in your browser using DataCamp Workspace