These accessors extract the metadata for a module (if specified) or all modules in a simList if not specified.

inputObjects(sim, module, path)

# S4 method for class 'simList'
inputObjects(sim, module, path)

# S4 method for class 'missing'
inputObjects(sim, module, path)

outputObjects(sim, module, path)

# S4 method for class 'simList'
outputObjects(sim, module, path)

# S4 method for class 'missing'
outputObjects(sim, module, path)

outputObjectNames(sim, module)

# S4 method for class 'simList'
outputObjectNames(sim, module)

reqdPkgs(sim, module, modulePath)

# S4 method for class 'simList'
reqdPkgs(sim, module, modulePath)

# S4 method for class 'missing'
reqdPkgs(sim, module, modulePath)

documentation(sim, module)

# S4 method for class 'simList'
documentation(sim, module)

sessInfo(sim)

# S4 method for class 'simList'
sessInfo(sim)

Arguments

sim

A simList object from which to extract element(s) or in which to replace element(s).

module

Character vector of module name(s)

path

The path to the module., i.e., the modulePath. Only relevant if sim not supplied.

modulePath

That path where module can be found. If set already using setPaths, it will use that. This will be ignored if sim is supplied and is required if sim not supplied

Value

The requested metadata: for a single module, the metadata itself (inputObjects() and outputObjects() give a data.frame, reqdPkgs() a character vector); for several modules, a list with one such element per module, named by module. outputObjectNames() and documentation() return a list. sessInfo() returns the sessionInfo() recorded in the simList.

Examples

# \donttest{
# set modulePath
setPaths(modulePath = getSampleModules(tempdir()))
#> Setting:
#>   options(
#>     spades.modulePath = '/tmp/RtmpmM1qrr/sampleModules'
#>   )
#> Paths set to:
#>   options(
#>     rasterTmpDir = '/tmp/RtmpmM1qrr/scratch/raster'
#>     reproducible.cachePath = '/tmp/RtmpmM1qrr/cache'
#>     spades.inputPath = '/tmp/RtmpmM1qrr/inputs'
#>     spades.outputPath = '/tmp/RtmpmM1qrr'
#>     spades.modulePath = '/tmp/RtmpmM1qrr/sampleModules'
#>     spades.scratchPath = '/tmp/RtmpmM1qrr/scratch'
#>   )
#>   terra::terraOptions(tempdir = '/tmp/RtmpmM1qrr/scratch/terra')
# use Require and reqdPkgs
pkgs <- reqdPkgs(module = c("caribouMovement", "randomLandscapes", "fireSpread"))
# }