# 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
# }
Run the code above in your browser using DataLab