load_knitr_cache: Load Knitr Cache

Description Usage Arguments Details Value Examples

View source: R/rmarkdown_helpers.R

Description

Loads the packages and objects stored in a knitr cache. Useful for restoring the internal state of a knitted document for use in an interactive session without forcing you to re-run all the code interactively.

Usage

1
2
load_knitr_cache(path, eval_promises = TRUE, load_packges = TRUE,
  envir = parent.frame())

Arguments

path

The path to the knitr cache directory.

eval_promises

A logical scalar controlling whether the cached objects are loaded as promises, (as created by lazyLoad) or whether the promises are evaluated. Defaults to TRUE, which evaluates promises. This may be a slow process if there are many large cached objects.

envir

The environment to load the cached objects and packges into. Defaults to the current calling environment

load_packages

A logical scalar controlling whether the packages loaded when the document was knit should be loaded now. Defaults to TRUE, which loads the packages.

Details

The knitr cache directory is usually stored in the same directory as the document. The knitr cache directory naming schema is '$DOCUMENTNAME$_cache/$OUTPUTFORMAT$/'. So, if your document named "Analysis.Rmd" was knit to HTML and cached, then the cache would be stored at 'Analysis_cache/html/'.

Value

Returns 'NULL' invisibly

Examples

1
2
3
4
## Not run: 
load_knitr_cache("Analysis_cache/html")

## End(Not run)

wjhopper/whoppeR documentation built on May 4, 2019, 7:33 a.m.