List the sub-targets of a dynamic target.
Usage
subtargets(
target = NULL,
character_only = FALSE,
cache = drake::drake_cache(path = path),
path = NULL
)
Arguments
- target
Character string or symbol, depending on
character_only
. Name of a dynamic target.- character_only
Logical, whether
target
should be treated as a character or a symbol. Just likecharacter.only
inlibrary()
.- cache
drake cache. See
new_cache()
. If supplied,path
is ignored.- path
Path to a
drake
cache (usually a hidden.drake/
folder) orNULL
.
Examples
if (FALSE) { # \dontrun{
isolate_example("dynamic branching", {
plan <- drake_plan(
w = c("a", "a", "b", "b"),
x = seq_len(4),
y = target(x + 1, dynamic = map(x)),
z = target(sum(x) + sum(y), dynamic = group(x, y, .by = w))
)
make(plan)
subtargets(y)
subtargets(z)
readd(x)
readd(y)
readd(z)
})
} # }