Learn R Programming

knitr (version 0.6.3)

build_dep: Build automatic dependencies among chunks

Description

When the chunk option autodep = TRUE, all names of objects created in a chunk will be saved in a file named __objects and all global objects used in a chunk will be saved to __globals. This function can analyze object names in these files to automatically build cache dependencies, which is similar to the effect of the dependson option. It is supposed to be used in the first chunk of a document and this chunk must not be cached.

Usage

build_dep(path = opts_chunk$get("cache.path"))

Arguments

path
the path to the dependency file

Value

  • NULL. The dependencies are built as a side effect.

References

http://yihui.name/knitr/demo/cache/