Deprecated. Use deps_code()
or deps_targets()
instead.
These functions are intended for debugging and checking your project.
The dependency structure of the components of your analysis
decides which targets are built and when.
deps(x)
Either a function or a string. Strings are commands from your workflow plan data frame.
A character vector, names of dependencies. Files wrapped in single quotes. The other names listed are functions or generic R objects.
If the argument is a knitr
report
(for example, file_store("report.Rmd")
or "\"report.Rmd\""
)
the the dependencies of the expected compiled
output will be given. For example, deps(file_store("report.Rmd"))
will return target names found in calls to loadd()
and readd()
in active code chunks.
These loadd()
/readd()
targets are needed
in order to run knit(knitr_in("report.Rmd"))
to produce the output file "report.md"
, so technically,
they are dependencies of "report.md"
, not "report.Rmd"
.
The file_store()
function
alerts drake
utility functions to file names by
enclosing them in literal double quotes.
(For example, file_store("report.Rmd")
is just "\"report.Rmd\""
.)
Drake
takes special precautions so that a target/import
does not depend on itself. For example, deps(f)`` might return
"f"if
f()` is a recursive function, but make()
just ignores
this conflict and runs as expected. In other words, make()
automatically removes all self-referential loops in the dependency
network.
# NOT RUN {
# See deps_code() for examples.
# }
Run the code above in your browser using DataLab