Convenience wrapper that calls outSave(), outTar(), and outUpload()
in sequence. The sim is saved to an RDS file, bundled with its output
files into a .tar.gz archive, and the archive is uploaded to a Google
Drive folder.
outSaveTarUpload(
runName,
sim,
gFolder = NULL,
simFilename = NULL,
tarDir = NULL,
tarball = NULL,
overwrite = TRUE,
cleanup = FALSE,
verbose = TRUE,
lazy = TRUE
)Character scalar. Used as the base name for the saved sim file and tarball.
A simList object.
A Google Drive folder identifier accepted by
googledrive::drive_upload() – a dribble, a Drive URL, or a bare
folder ID from googledrive::as_id().
Character scalar. Full path for the .rds file.
Defaults to SpaDES.core::simFile(name = runName, path = outputPath(sim), time = end(sim), ext = "rds").
Character scalar. Directory in which to create the tarball.
Defaults to dirname(simFilename).
Character scalar. Path to the local file to upload.
Logical. Overwrite an existing file of the same name in
the Drive folder. Default TRUE.
Logical. Delete the local tarball after a successful upload.
Default FALSE.
Numeric message level, forwarded to
SpaDES.core::saveSimList(). Defaults to getOption("reproducible.verbose", 1)
– note the fallback: saveSimList() resolves its own default as a bare
getOption("reproducible.verbose"), and passes the result to
Require::messageVerbose(), whose if (verbose >= verboseLevel) fails with
"argument is of length zero" whenever that option happens to be unset.
Logical. Passed to SpaDES.core::saveSimList(). When TRUE
(default), each user object in sim@.xData and each module's mod objects
in sim@.xData$.modObjs are written to their own file in a sibling
<simFilename sans ext>_lazy/ directory, and lazily restored on load via
delayedAssign. outTar() picks up that directory automatically.
Invisibly returns the dribble from googledrive::drive_upload().