simList-accessors-paths: Specify paths for modules, inputs, outputs, and temporary...

pathsR Documentation

Specify paths for modules, inputs, outputs, and temporary rasters

Description

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")

Usage

paths(sim)

## S4 method for signature 'simList'
paths(sim)

paths(sim) <- value

## S4 replacement method for signature 'simList'
paths(sim) <- value

cachePath(sim)

## S4 method for signature 'simList'
cachePath(sim)

cachePath(sim) <- value

## S4 replacement method for signature 'simList'
cachePath(sim) <- value

inputPath(sim)

## S4 method for signature 'simList'
inputPath(sim)

inputPath(sim) <- value

## S4 replacement method for signature 'simList'
inputPath(sim) <- value

outputPath(sim)

## S4 method for signature 'simList'
outputPath(sim)

outputPath(sim) <- value

## S4 replacement method for signature 'simList'
outputPath(sim) <- value

figurePath(sim)

## S4 method for signature 'simList'
figurePath(sim)

logPath(sim)

## S4 method for signature 'simList'
logPath(sim)

modulePath(sim, module)

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

modulePath(sim) <- value

## S4 replacement method for signature 'simList'
modulePath(sim) <- value

scratchPath(sim)

## S4 method for signature 'simList'
scratchPath(sim)

scratchPath(sim) <- value

## S4 replacement method for signature 'simList'
scratchPath(sim) <- value

rasterPath(sim)

## S4 method for signature 'simList'
rasterPath(sim)

rasterPath(sim) <- value

## S4 replacement method for signature 'simList'
rasterPath(sim) <- value

terraPath(sim)

## S4 method for signature 'simList'
terraPath(sim)

terraPath(sim) <- value

## S4 replacement method for signature 'simList'
terraPath(sim) <- value

dataPath(sim)

## S4 method for signature 'simList'
dataPath(sim)

Arguments

sim

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

value

The parameter value to be set (in the corresponding module and param).

module

The optional character string of the module(s) whose paths are desired. If omitted, will return all module paths, if more than one exist.

Details

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")

Value

Returns or sets the value of the slot from the simList object.

See Also

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()


PredictiveEcology/SpaDES.core documentation built on April 17, 2024, 8:27 a.m.