EVOLUTION-MANAGER
Edit File: dep_auto.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Build automatic dependencies among chunks</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for dep_auto {knitr}"><tr><td>dep_auto {knitr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Build automatic dependencies among chunks</h2> <h3>Description</h3> <p>When the chunk option <code>autodep = TRUE</code>, all names of objects created in a chunk will be saved in a file named ‘<span class="file">__objects</span>’ and all global objects used in a chunk will be saved to ‘<span class="file">__globals</span>’. This function can analyze object names in these files to automatically build cache dependencies, which is similar to the effect of the <code>dependson</code> option. It is supposed to be used in the first chunk of a document and this chunk must not be cached. </p> <h3>Usage</h3> <pre> dep_auto(path = opts_chunk$get("cache.path")) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>path</code></td> <td> <p>Path to the dependency file.</p> </td></tr> </table> <h3>Value</h3> <p><code>NULL</code>. The dependencies are built as a side effect. </p> <h3>Note</h3> <p>Be cautious about <code>path</code>: because this function is used in a chunk, the working directory when the chunk is evaluated is the directory of the input document in <code><a href="knit.html">knit</a></code>, and if that directory differs from the working directory before calling <code>knit()</code>, you need to adjust the <code>path</code> argument here to make sure this function can find the cache files ‘<span class="file">__objects</span>’ and ‘<span class="file">__globals</span>’. </p> <h3>References</h3> <p><a href="https://yihui.org/knitr/demo/cache/">https://yihui.org/knitr/demo/cache/</a> </p> <h3>See Also</h3> <p><code><a href="dep_prev.html">dep_prev</a></code> </p> <hr /><div style="text-align: center;">[Package <em>knitr</em> version 1.29 <a href="00Index.html">Index</a>]</div> </body></html>