All functions

Copy(<simList>)

Copy for simList class objects

Plot(<simList>)

Plot method for simList objects

Plots()

Plot wrapper intended for use in a SpaDES module

SpaDES.core SpaDES.core-package

Categorized overview of the SpaDES.core package

.addChangedAttr(<simList>)

.addChangedAttr for simList objects

.addTagsToOutput(<simList>)

.addTagsToOutput for simList objects

all(<equal.simList>)

All equal method for simList objects

anyPlotting()

Test whether there should be any plotting from .plots module parameter

append_attr()

Append attributes

bindrows()

Simple wrapper around data.table::rbindlist

.cacheMessage(<simList>)

.cacheMessage for simList objects

.checkCacheRepo(<list>)

.checkCacheRepo for simList objects

checkModule()

Check for the existence of a remote module

checkModuleLocal()

Check for the existence of a module locally

checkModulePath()

Uses "." if getPath not set

checkObject()

Check for existence of object(s) referenced by a objects slot of a simList object

checkParams()

Check use and existence of parameters passed to simulation.

checkpointFile() `checkpointFile<-`() checkpointInterval() `checkpointInterval<-`() doEvent.checkpoint() checkpointLoad() .checkpointSave()

Simulation checkpoints

checksums()

Calculate checksum for a module's data files

citation()

A citation method for SpaDES modules

classFilter()

Filter objects by class

clearCache(<simList>) showCache(<simList>) keepCache(<simList>)

clearCache for simList objects

convertToPackage()

Convert standard module code into an R package

copyModule()

Create a copy of an existing module

createsOutput()

Define an output object of a module

.wrap(<simList>) .wrap(<.simDeps>) .unwrap(<.simDeps>) .wrap(<.moduleDeps>) .unwrap(<.moduleDeps>) .unwrap(<simList>)

Methods for .wrap and .unwrap

defineEvent()

Alternative way to define events in SpaDES.core

defineModule()

Define a new module.

defineParameter()

Define a parameter used in a module

zipSimList() experiment() experiment2() POM() simInitAndExperiment() loadPackages()

Zip a simList and various files

depsEdgeList()

Build edge list for module dependency graph

depsGraph()

Build a module dependency graph

.guessPkgFun()

Guess package of a function

downloadData()

Download module data

downloadModule()

Download a module from a SpaDES module GitHub repository

eventDiagram()

Simulation event diagram

expectsInput()

Define an input object that the module expects.

extractURL()

Extract a url from module metadata

fileName()

Extract filename (without extension) of a file

.findSimList()

Find simList in a nested list

getModuleVersion()

Find the latest module version from a SpaDES module repository

getMapPath() getSampleModules()

Get copies of sample files for examples and tests

globals() `globals<-`() G() `G<-`()

Get and set global simulation parameters

initialize(<simList>) initialize(<simList_>)

Generate a simList object

.fileExtensions() loadFiles() .saveFileExtensions()

File extensions map

loadSimList() unzipSimList()

Load a saved simList and ancillary files

makeMemoisable(<simList>) unmakeMemoisable(<simList_>)

Make simList correctly work with memoise

maxTimeunit()

Determine the largest timestep unit in a simulation

memoryUseThisSession() memoryUse()

Estimate memory used with system("ps")

minTimeunit()

Determine the smallest timeunit in a simulation

moduleCodeFiles()

Extract the full file paths for R source code

moduleCoverage()

Calculate module coverage of unit tests

moduleDefaults

Defaults values used in defineModule

moduleDiagram()

Simulation module dependency diagram

moduleGraph()

Build a module dependency graph

moduleMetadata()

Parse and extract module metadata

moduleParams() moduleInputs() moduleOutputs()

Extract a module's parameters, inputs, or outputs

moduleVersion()

Parse and extract a module's version

newModule() newModuleCode() newModuleDocumentation()

Create new module from template

newModuleTests()

Create template testing structures for new modules

newProject()

Create new SpaDES project

newProjectCode()

Create new module code file

noEventWarning()

Text for no event with that name

objSize(<simList>)

Object size for simList

objectDiagram()

Simulation object dependency diagram

objectSynonyms()

Identify synonyms in a simList

objs() `objs<-`() moduleObjects() findObjects()

Extract or replace an object from the simulation environment

openModules()

Open all modules nested within a base directory

packages()

Get module or simulation package dependencies

paramCheckOtherMods()

Test and update a parameter against same parameter in other modules

params() `params<-`() P() `P<-`() parameters()

Get and set simulation parameters

.parseElems(<simList>)

.parseElems for simList class objects

.preDigestByClass(<simList>)

Pre-digesting method for simList

.prepareOutput(<simList>)

.prepareOutput for simList objects

.first() .highest() .last() .lowest() .normal()

Event priority

progressInterval() `progressInterval<-`() progressType() `progressType<-`()

Get and set simulation progress bar details

newProgressBar() setProgressBar()

Progress bar

.quickCheck

The SpaDES.core variable to switch between quick and robust checking

rasterCreate()

Simple wrapper to load any Raster* object

rasterToMemory()

Read raster to memory

remoteFileSize()

Determine the size of a remotely hosted file

restartR()

Restart R programmatically

restartSpades()

Restart an interrupted simulation

.rndstr() rndstr()

Generate random strings

.robustDigest(<simList>)

.robustDigest for simList objects

saveFiles()

Save objects using .saveObjects in params slot of simInit

saveSimList()

Save a whole simList object to disk

savedSimEnv()

Retrieve environment for saving interrupted simulations

scheduleConditionalEvent()

Schedule a conditional simulation event

scheduleEvent()

Schedule a simulation event

show(<simList>)

Show an Object

simFile()

Generate simulation file name

simInit() simInit2() simInitDefaults()

Initialize a new simulation

simInitAndSpades2() simInitAndSpades()

simInitAndSpades2 is a convenience wrapper for do.call(simInitAndSpades, listOfArgs), i.e., a user can pass a list of all the arguments.

envir() `envir<-`()

Simulation environment

events() `events<-`() conditionalEvents() current() `current<-`() completed() `completed<-`()

Simulation event lists

inputs() `inputs<-`() inputArgs() `inputArgs<-`()

Simulation inputs

inputObjects() outputObjects() outputObjectNames() reqdPkgs() documentation() sessInfo()

Metadata accessors

modules() `modules<-`() depends() `depends<-`()

Simulation modules and dependencies

newObjectsCreated()

Show which objects were first created in a simInit or spades call

outputs() `outputs<-`() registerOutputs() outputArgs() `outputArgs<-`()

Simulation outputs

paths() `paths<-`() cachePath() `cachePath<-`() inputPath() `inputPath<-`() outputPath() `outputPath<-`() figurePath() logPath() modulePath() `modulePath<-`() scratchPath() `scratchPath<-`() rasterPath() `rasterPath<-`() terraPath() `terraPath<-`() dataPath()

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

times() `times<-`() time(<simList>) `time<-`() end() `end<-`() start() `start<-`() timeunit() `timeunit<-`() timeunits() elapsedTime()

Time usage in SpaDES

simList-class simList simList_-class simList_

The simList class

spadesClasses

Classes defined in SpaDES

spades2() spades()

spades2 is a convenience wrapper for do.call(spades, listOfArgs), i.e., a user can pass a list of all the arguments.

spadesOptions()

SpaDES.core options

dhour() dmin() dday() dyears() dmonths() dweeks() dweek() dmonth() dyear() dsecond() dNA()

SpaDES time units

`[`(<simList>,<character>,<ANY>)

Extract an intact simList but with subset of objects

suppliedElsewhere()

Assess whether an object has or will be supplied from elsewhere

.tagsByClass(<simList>)

.tagsByClass for simList objects

inSeconds() convertTimeunit() .spadesTimes spadesTimes() checkTimeunit()

Convert time units

updateList()

Update elements of a named list with elements of a second named list

use_gha()

Use GitHub actions for automated module checking

writeEventInfo()

Write simulation event info to file

writeRNGInfo()

Write RNG state info to file

zipModule()

Create a zip archive of a module subdirectory