These provide top-level, powerful settings for a comprehensive SpaDES workflow. To see defaults, run `spadesOptions()`. See Details below.



Below are options that can be set with `options("" = newValue)`, where `xxx` is one of the values below, and `newValue` is a new value to give the option. Sometimes these options can be placed in the user's `.Rprofile` file so they persist between sessions.

The following options are likely of interest to most users

`spades.browserOnError``FALSE`If `TRUE`, the default, then any error rerun the same event with `debugonce` called on it to allow editing to be done. When that browser is continued (e.g., with 'c'), then it will save it re-parse it into the `simList` and rerun the edited version. This may allow a `spades()` call to be recovered on error, though in many cases that may not be the correct behaviour. For example, if the `simList` gets updated inside that event in an iterative manner, then each run through the event will cause that iteration to occur. When this option is `TRUE`, then the event will be run at least 3 times: the first time makes the error, the second time has `debugonce` and the third time is after the error is addressed. `TRUE` is likely somewhat slower.
`reproducible.cachePath``getOption('reproducible.cachePath')`The default local directory in which to cache simulation outputs. Default is a temporary directory (typically `/tmp/RtmpXXX/SpaDES/cache`).
`spades.debug``TRUE`The default debugging value `debug` argument in `spades()`
`spades.dotInputObjects``TRUE`This is used in `simInit`; if set to `TRUE` then the `.inputObjects` function will be run; if `FALSE`, then it will be skipped.
`spades.DTthreads``1L`The default number of data.table threads to use. See also `?data.table::setDTthreads`.
`spades.futureEvents``FALSE`If set to `TRUE`, the event simulator will attempt to spawn events whose outputs are not needed (by other events in the sim) into a future. In some cases, this will speed up simulations, by running some events in parallel. Still VERY experimental. Use cautiously.
`spades.inputPath`Default is a temporary directory (typically `/tmp/RtmpXXX/SpaDES/inputs`)The default local directory in which to look for simulation inputs.
`spades.loadReqdPkgs`Default is `TRUE` meaning that any `reqdPkgs` will be loaded via `Require` or `require`. If `FALSE`, no package loading will occur.`spades.lowMemory`
`FALSE`If true, some functions will use more memory efficient (but slower) algorithms.`spades.memoryUseInterval`
`FALSE`A numeric in seconds indicating how often sample the memory use. This will be run in a separate "future" process so it can monitor the main process. To access the resulting memory use table, use `memoryUse(sim)` after the simulation has terminated.`spades.messagingNumCharsModule`
`21`The number of characters to use for the messaging preamble on each line of the messaging during spades calls.`spades.moduleCodeChecks`
`list(suppressParamUnused = FALSE, suppressUndefined = TRUE, suppressPartialMatchArgs = FALSE, suppressNoLocalFun = TRUE, skipWith = TRUE)`Should the various code checks be run during `simInit`. These are passed to codetools::checkUsage. Default is given by the function, plus these:`moduleDocument`
`NULL`When a module is an R package e.g., via `convertToPackage`, it will not, by default, rebuild documentation during `simInit`. If the user would like this to happen on every call to `simInit`, set this option to `TRUE``spades.modulePath`
`file.path(tempdir(), "SpaDES", "modules")`)The default local directory where modules and data will be downloaded and stored. Default is a temporary directory`spades.moduleRepo`
`"PredictiveEcology/SpaDES-modules"`The default GitHub repository to use when downloading modules via `downloadModule``spades.nCompleted`
`1000L`The maximum number of completed events to retain in the `completed` event queue.`spades.outputPath`
`file.path(tempdir(), "SpaDES", "outputs")`The default local directory in which to save simulation outputs.`spades.plots`
The value of this will passed to `.plots` within every module; it will thus override all module parameter values for `.plots`. This can, e.g., be used to turn off all plotting.The default is NULL, meaning accept the module-level parameter`spades.recoveryMode`
`1L`If this a numeric > 0 or TRUE, then the discrete event simulator will take a snapshot of the objects in the `simList` that might change (based on metadata `outputObjects` for that module), prior to initiating every event. This will allow the user to be able to recover in case of an error or manual interruption (e.g., `Esc`). If this is numeric, a copy of that number of "most recent events" will be maintained so that the user can recover and restart > 1 event in the past, i.e., redo some of the "completed" events. Default is `TRUE`, i.e., it will keep the state of the `simList` at the start of the current event. This can be recovered with `restartSpades` and the differences can be seen in a hidden object in the stashed `simList`. There is a message which describes how to find that.`spades.scratchPath`
`file.path(tempdir(), "SpaDES", "scratch")`)The default local directory where transient files from modules and data will written. This includes temporary `raster` and `terra` files, as well as SpaDES recovery mode files. Default is a temporary directory.`spades.switchPkgNamespaces`
`FALSE` to keep computational overhead down.Should the search path be modified to ensure a module's required packages are listed first? If `TRUE`, there should be no name conflicts among package objects, but it is much slower, especially if the events are themselves fast.`spades.testMemoryLeaks`
`TRUE`.There is a very easy way to create a memory leak with R and SpaDES, by adding formulas or functions to `sim$` when the enclosing environment of the formula or function contained a large object, most relevant here is the `sim` object. SpaDES.core now tests for likely culprits for this and suggests alternatives with a warning`spades.tolerance`
`.Machine$double.eps^0.5`.The default tolerance value used for floating point number comparisons.`spades.useragent`
`""`.: The default user agent to use for downloading modules from GitHub.`spades.useRequire`
`!tolower(Sys.getenv("SPADES_USE_REQUIRE")) : The default for that environment variable is unset, so this returns `TRUE`. If this is `TRUE`, then during the `simInit` call, when packages are identified as being required, these will be installed if missing, only if `spades.useRequire` option is `TRUE`, otherwise, `simInit` will fail because packages are not available.