Learn R Programming

reproducible (version 3.2.1)

.dumpPreDigest: Dump the element-by-element preDigest of a Cache() call

Description

Diagnostic for "why is my cacheId different here than there?" -- e.g. why a cloud cache is not shared across machines/OSs. Unlike showSimilar (which only reports the closest prior call's differences) or dryRun/verbose, this prints the full name = hash list that produced the cacheId, for every Cache() call (including ones constructed deep inside other packages, e.g. SpaDES.core events), so two machines' dumps can be diffed directly.

Usage

.dumpPreDigest(
  detailed_key,
  .functionName,
  dump = getOption("reproducible.preDigestDump", NULL),
  pattern = getOption("reproducible.preDigestDumpPattern", NULL),
  verbose = getOption("reproducible.verbose", 1)
)

Value

invisible(NULL), called for its side effect.

Arguments

detailed_key

The list returned by CacheDigest() (has key/outputHash and preDigest).

.functionName

The function name for this Cache() call.

dump, pattern, verbose

Resolved from the options above.

Details

Controlled by options (off by default):

reproducible.preDigestDump

NULL/FALSE (off); TRUE to emit each call's sorted name = hash list via messageCache(); or a directory path to write one preDigest_<functionName>[_<n>].txt file per call (point it at a fresh/empty directory, then diff the directory against the other machine's).

reproducible.preDigestDumpPattern

optional regular expression matched against the call's .functionName; only matching calls are dumped (e.g. "init|inputObjects").