params

0th

Percentile

Get and set simulation parameters.

Accessor functions for the params slot of a simList object and its elements. Additonal methods are provided to access core module and global parameters: Commonly used

globals
List of global simulation parameters.
params
Nested list of all simulation parameters.
Advanced use
Accessor method Module
Description checkpointFile
.checkpoint Name of the checkpoint file. (advanced)
checkpointInterval .checkpoint
The simulation checkpoint interval. (advanced) progressType
.progress Type of graphical progress bar used. (advanced)
progressInterval .progress
Interval for the progress bar. (advanced) Accessor method

Usage
params(object)
"params"(object)
params(object) <- value
"params"(object) <- value
globals(object)
"globals"(object)
globals(object) <- value
"globals"(object) <- value
checkpointFile(object)
"checkpointFile"(object)
checkpointFile(object) <- value
"checkpointFile"(object) <- value
checkpointInterval(object)
"checkpointInterval"(object)
checkpointInterval(object) <- value
"checkpointInterval"(object) <- value
progressInterval(object)
"progressInterval"(object)
progressInterval(object) <- value
"progressInterval"(object) <- value
progressType(object)
"progressType"(object)
progressType(object) <- value
"progressType"(object) <- value
Arguments
object
A simList simulation object.
value
The object to be stored at the slot.
Details

Currently, only get and set methods are defined. Subset methods are not.

Progress Bar: Progress type can be "text", "graphical" or "shiny". Progress interval can be a numeric. These both can get set by passing a .progress=list(type="graphical", interval=1) into the simInit call. See examples

Value

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

See Also

simList-class, simList-accessors-envir, simList-accessors-events, simList-accessors-inout, simList-accessors-modules, simList-accessors-objects, simList-accessors-paths, simList-accessors-times.

Aliases
  • checkpointFile
  • checkpointFile,.simList-method
  • checkpointFile<-
  • checkpointFile<-,.simList-method
  • checkpointInterval
  • checkpointInterval,.simList-method
  • checkpointInterval<-
  • checkpointInterval<-,.simList-method
  • globals
  • globals,.simList-method
  • globals<-
  • globals<-,.simList-method
  • params
  • params,.simList-method
  • params<-
  • params<-,.simList-method
  • progressInterval
  • progressInterval,.simList-method
  • progressInterval<-
  • progressInterval<-,.simList-method
  • progressType
  • progressType,.simList-method
  • progressType<-
  • progressType<-,.simList-method
  • simList-accessors-params
Examples
## Not run: 
# mySim <- simInit(times=list(start=0.0, end=100.0),
#                  params=list(.globals=list(stackName="landscape"),
#                              .progress=list(type="text", interval=10),
#                              .checkpoint = list(interval = 10, file = "chkpnt.RData")),
#                  modules=list("randomLandscapes"),
#                  paths=list(modulePath=system.file("sampleModules", package="SpaDES")))
# 
# # progress bar
# progressType(mySim) # "text"
# progressInterval(mySim) # 10
# 
# # parameters
# params(mySim) # returns all parameters in all modules
#               # including .global, .progress, .checkpoint
# globals(mySim) # returns only global parameters
# 
# # checkpoint
# checkpointFile(mySim) # returns the name of the checkpoint file
#                       # In this example, "chkpnt.RData"
# checkpointInterval(mySim) # 10
# ## End(Not run)
Documentation reproduced from package SpaDES, version 1.2.0, License: GPL-3

Community examples

Looks like there are no examples yet.