lazy_load: Functions for lazy-loading knitr caches.

Description Usage Arguments Value Author(s)

Description

These functions are helpful for loading cached chunks into an interactive R session.

Use lazyload_cache_dir to load a whole directory of cached objects.

Use lazyload_cache_labels to load and explicit set of cached chunks.

Usage

1
2
3
4
5
lazyload_cache_dir(path = "./cache", envir = parent.frame(), ask = FALSE,
                   verbose = getOption("verbose",FALSE), full.names = TRUE, ...)
lazyload_cache_labels(labels, path = "./cache/", envir = parent.frame(),
                   verbose = getOption("verbose",FALSE), filter,
                   full.names = TRUE, ...)

Arguments

path

the path to the cache directory

labels

character vector; chunk labels to load

envir

the environment to load the objects into

ask

if TRUE, interactively ask whether to load each database discovered in path

verbose

if TRUE, display the names of chunk labels being loaded

full.names

use the full name, i.e., include the path, for the chunk label? This argument is passed to list.files.

filter

optional function; passed to lazyLoad. When called on a character vector of object names, this function should return a logical vector: objects for which this is TRUE will be loaded.

...

additional arguments passed to list.files

Value

Both functions return NULL, invisibly.

Author(s)

Peter DeWitt (https://github.com/dewittpe).


kingaa/aakmisc documentation built on Dec. 11, 2017, 10 a.m.