Inverse of outSave(). Loads one or more simLists from .rds files produced by outSave(). Defaults to SpaDES.core::loadSimList(); set method = "readRDS" to bypass .unwrap entirely.

Note that SpaDES.core::saveSimList() uses .wrapResiliently to NULL out file-backed objects with inaccessible backing files at save time. Load-time failures (e.g. backing files missing on this machine even though they were present at save time) are independent of that, and are handled by loadSimList's pre-.unwrap resilient pass.

reLoad(
  simFilenames,
  projectPath = getwd(),
  method = c("loadSimList", "readRDS"),
  parse = TRUE,
  ...
)

Arguments

simFilenames

Character vector of paths to .rds files.

projectPath

Character scalar. Passed to SpaDES.core::loadSimList() for relative-path resolution. Default getwd().

method

One of "loadSimList" (default) or "readRDS".

parse

Logical. If TRUE (default), module source code is re-parsed on load. FALSE forwards parse = FALSE to SpaDES.core::loadSimList(), which skips it – worthwhile because reparsing dominates the load time of a lazily saved simList (on a 19-module simulation, ~7 s of a ~9.5 s load). Objects are unaffected: user objects and each module's mod objects are still bound lazily. The result is inspect-only – it has no module code, so it cannot be passed to SpaDES.core::spades(). Ignored when method = "readRDS".

...

Additional args forwarded to SpaDES.core::loadSimList() (ignored when method = "readRDS").

Value

A list of simList objects, named by basename(simFilenames).