Accessor functions for the paths
slot in a simList
object.
dataPath
will return file.path(modulePath(sim), currentModule(sim), "data")
.
dataPath
, like currentModule
,is namespaced. This means that when
it is used inside a module, then it will return that model-specific information.
For instance, if used inside a module called "movingAgent"
,
then currentModule(sim)
will return "movingAgent"
, and dataPath(sim)
will return
file.path(modulePath(sim), "movingAgent", "data")
paths(sim)# S4 method for simList
paths(sim)
paths(sim) <- value
# S4 method for simList
paths(sim) <- value
cachePath(sim)
# S4 method for simList
cachePath(sim)
cachePath(sim) <- value
# S4 method for simList
cachePath(sim) <- value
inputPath(sim)
# S4 method for simList
inputPath(sim)
inputPath(sim) <- value
# S4 method for simList
inputPath(sim) <- value
outputPath(sim)
# S4 method for simList
outputPath(sim)
outputPath(sim) <- value
# S4 method for simList
outputPath(sim) <- value
figurePath(sim)
# S4 method for simList
figurePath(sim)
logPath(sim)
# S4 method for simList
logPath(sim)
modulePath(sim, module)
# S4 method for simList
modulePath(sim, module)
modulePath(sim) <- value
# S4 method for simList
modulePath(sim) <- value
scratchPath(sim)
# S4 method for simList
scratchPath(sim)
scratchPath(sim) <- value
# S4 method for simList
scratchPath(sim) <- value
rasterPath(sim)
# S4 method for simList
rasterPath(sim)
rasterPath(sim) <- value
# S4 method for simList
rasterPath(sim) <- value
terraPath(sim)
# S4 method for simList
terraPath(sim)
terraPath(sim) <- value
# S4 method for simList
terraPath(sim) <- value
dataPath(sim)
# S4 method for simList
dataPath(sim)
Returns or sets the value of the slot from the simList
object.
A simList
object from which to extract element(s) or in which to replace element(s).
The parameter value to be set (in the corresponding module
and param
).
The optional character string of the module(s) whose paths are desired. If omitted, will return all module paths, if more than one exist.
These are ways to add or access the file paths used by spades()
.
There are five file paths: cachePath
, modulePath
,
inputPath
, outputPath
, and rasterPath
.
Each has a function to get or set the value in a simList
object.
If no paths are specified, the defaults are as follows:
cachePath
: getOption("reproducible.cachePath")
;
inputPath
: getOption("spades.modulePath")
;
modulePath
: getOption("spades.inputPath")
;
outputPath
: getOption("spades.outputPath")
;
rasterPath
: file.path(getOption("spades.scratchPath"), "raster")
;
scratchPath
: getOption("spades.scratchPath")
;
terraPath
: file.path(getOption("spades.scratchPath"), "terra")
SpaDES.core-package, specifically the section 1.2.4 on Simulation Paths.
Other functions to access elements of a 'simList' object:
.addDepends()
,
checkpointFile()
,
envir()
,
events()
,
globals()
,
inputs()
,
modules()
,
objs()
,
packages()
,
params()
,
progressInterval()
,
times()