lazyload: Functions for lazy-loading knitr caches.

lazyloadR Documentation

Functions for lazy-loading knitr caches.

Description

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

Usage

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

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.

...

additional arguments passed to list.files

labels

character vector; chunk labels to load

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.

Details

Use lazyload_cache_dir to load a whole directory of cached objects.

Use lazyload_cache_labels to load and explicit set of cached chunks.

Value

Both functions return NULL, invisibly.

Author(s)

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


kingaa/aakmisc documentation built on April 3, 2024, 1:33 a.m.