R/simList-accessors.R
simList-accessors-paths.Rd
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 modulePath(sim, module) # S4 method for simList modulePath(sim, module) modulePath(sim) <- value # S4 method for simList modulePath(sim) <- value rasterPath(sim) # S4 method for simList rasterPath(sim) rasterPath(sim) <- value # S4 method for simList rasterPath(sim) <- value dataPath(sim) # S4 method for simList dataPath(sim)
sim | A |
---|---|
value | The object to be stored at the slot. |
module | The optional character string of the module(s) whose paths are desired. If omitted, will return all modulePaths, if more than one exist. |
Returns or sets the value of the slot from the simList
object.
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
: raster::tmpDir()
SpaDES.core-package
, specifically the section 1.2.4 on Simulation Paths.
Other functions to access elements of a 'simList' object:
.addDepends()
,
doEvent.checkpoint()
,
envir()
,
events()
,
globals()
,
inputs()
,
modules()
,
objs()
,
packages()
,
params()
,
progressInterval()
,
times()