preknit_cache | R Documentation |
If called in an interactive session, the object will be cached to be subsequently loaded in a non-interactive session, such as when R markdown is knit. A previous run of a given chunk is required and an error will be thrown if the cached object does not exist.
preknit_cache(object, dirs)
object |
Object to be cached. |
dirs |
Required. Path to the subdirectory within R.cache root path to save the cache to. |
This function is useful when reporting on a process that has already been executed and does not require re-execution during the knitting process. For example, a Neo4j database can be written in an interactive session at which point the metadata for reporting purposes can be logged. Instead of forcing the database to be instantiated when the R markdown is knit, knitr will only pull up the cached log.
If called in a non-interactive session, the object will be returned
in the parent frame without being declared.
saveCache
,findCache
,loadCache
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.