Learn R Programming

⚠️There's a newer version (2.0.11) of this package.Take me there.

SpaDES (version 1.1.4)

Develop and Run Spatially Explicit Discrete Event Simulation Models

Description

Easily implement a variety of simulation models, with a focus on spatially explicit agent based models. These include raster-based, event-based, and agent-based models. The core simulation components are built upon a discrete event simulation framework that facilitates modularity, and easily enables the user to include additional functionality by running user-built simulation modules. Included are numerous tools to visualize raster and other maps. The suggested package `fastshp` can be installed with `install.packages("fastshp", repos="http://rforge.net", type="source")`.

Copy Link

Version

Install

install.packages('SpaDES')

Monthly Downloads

1,226

Version

1.1.4

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Alex M Chubaty

Last Published

April 20th, 2016

Functions in SpaDES (1.1.4)

params

Get and set simulation parameters.
normPath

Normalize filepath
objs

Extract or replace an object from the simulation environment
.arrangement-class

The .arrangement class
initialize,simList-method

Generate a simList object
adj.raw

Fast `adjacent` function, and Just In Time compiled version
append_attr

Add a module to a moduleList
.fileExtensions

File extensions map
gpar

Importing some grid functions
.makeSpadesPlot

Make a .spadesPlot class object
probInit

SELES - Probability of Initiation
.moduleDeps-class

The .moduleDeps class
Plot

Plot: Fast, optimally arranged, multipanel plotting function with SpaDES
transitions

SELES - Transitioning to next time step
inRange

Test whether a number lies within range [a,b]
.depsLoadOrder

Determine module load order
spadesMaps

Dummy maps included with SpaDES
moduleMetadata

Parse and extract module metadata
makeDigestible

Remove any reference to environments in a simList
layerNames

Extract the layer names of Spatial Objects
defineParameter

Define a parameter used in a module
checkObject

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

Check filepath.
rndstr

Generate random strings
getFileName

Get the name of a source-ed file
show,simList-method

Show an Object
.addDepends

Add simulation dependencies
simInit

Initialize a new simulation
maxTimeunit

Determine the largest timestep unit in a simulation
SpaDES-package

Categorized overview of the SpaDES package
digest

Calculate the hashes of multiple files
.prepareRaster

Prepare raster for plotting
classFilter

Filter objects by class
.makeColorMatrix

Convert Raster to color matrix useable by raster function for plotting
equalExtent

Assess whether a list of extents are all equal
.parseArgs

Parse arguments and find environments
changeObjEnv

Copy or move objects from one environment to another
heading

Heading between spatial points.
envir

Simulation environment
.spadesGrob-class

The .spadesGrob class
rasterizeReduced

Convert reduced representation to full raster
agentLocation

SELES - Agent Location at initiation
.first

Event priority
.emptyMetadata

Default (empty) metadata
.unparsed

Determine which modules in a list are unparsed
defineModule

Define a new module.
minTimeunit

Determine the smallest timeunit in a simulation
.depsPruneEdges

Prune edges to remove cycles in module dependencies
setColors<-

Set colours for plotting Raster* objects.
.assignSpaDES

Assign to the internal SpaDES environment.
doEvent.checkpoint

Simulation checkpoints.
depsEdgeList

Build edge list for module dependency graph
times

Time usage in SpaDES
.fillInputRows

An internal function for coercing a data.frame to inputs()
downloadData

Download module data
getModuleVersion

Find the latest module version from a SpaDES module repository
.unittrim

Convert grid.locator units
downloadModule

Download a module from a SpaDES module GitHub repository
cache

Cache method for simList class objects
versionWarning

Compare module version against SpaDES package version and warn if incompatible
moduleCoverage

Calculate module coverage of unit tests
move

Move
rasterToMemory

Read raster to memory
fileName

Extract filename (without extension) of a file
.spadesPlotObjects-class

The .spadesPlotObjects class
dev

Specify where to plot
scheduleEvent

Schedule a simulation event
newPlot

Open a new plotting window
ls.str.simList

List simulation objects and their structure
spatialObjects-class

The spatialObjects class
dyears

SpaDES time units
spadesClasses

Classes defined in SpaDES
updateList

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

Simulation modules and dependencies
makeLines

Make SpatialLines object from two SpatialPoints objects
currentModule,.simList-method

Simulation event lists
.emptyEventList

Blank (template) event list
.sim2gantt

sim2gantt
experiment

ganttStatus

ganttStatus
clickValues

Mouse interactions with Plots
objectNames

Extracts the object names
.spadesPlottables-class

The .spadesPlottables class
simList_-class

The simList_ class
ls.simList

List simulation objects
paddedFloatToChar

Convert numeric to character with padding
.spadesPlot-class

The .spadesPlot class
.makeLayout

Make an optimal layout of plots
patchSize

Patch size
.makeViewports

Make viewports
spread

Simulate a spread process on a landscape.
checkParams

Check use and existence of params passed to simulation.
clearPlot

Clear plotting device
fileExt

Extract the file extension of a file
.existsSpaDES

Is an object defined in the .spades environment?
saveFiles

Save objects using .saveObjects in params slot of simInit
doEvent

Process a simulation event
shine

Display a simple, interactive shiny app of the simList
.updateSpadesPlot

Merge two SpaDES Plot objects
initiateAgents

SELES - Initiate agents
copy

Copy a simList object
getColors

Get colours for plotting Raster* objects.
checkModule

Check for the existence of a remote module
randomPolygons

randomPolygons
.spadesEnv

The SpaDES environment
numAgents

SELES - Number of Agents to initiate
gaussMap

Produce a raster of a random Gaussian process.
openModules

Open all modules nested within a base directory
.simList-class

The simList class
spades

Run a spatial discrete event simulation
nlayers,list-method

Find the number of layers in a Spatial Object
zipModule

Create a zip archive of a module subdirectory
sortDotsFirst

Sort a any named object with dotted names first
.arrangeViewports

Determine optimal plotting arrangement of plot objects
dwrpnorm2

Vectorized wrapped normal density function
.makeList

Convert plotArgs to list of lists
.identifyGrobToPlot

Identify where to get the grob from
objectDiagram

Simulation object dependency diagram
.parseModule

Parse and initialize a module
clearStubArtifacts

Clear erroneous archivist artifacts
.fillOutputRows

An internal function for coercing a data.frame to inputs()
moduleDiagram

Simulation module dependency diagram
newProgressBar

Progress bar
.simDeps-class

The .simDeps class
.plotGrob

Plot spatial grobs (using grid package)
wrap

Wrap coordinates or pixels in a torus-like fashion
inSeconds

Convert time units
divergentColors

Divergent colour palette
.findFactors

Find factors
.getSpaDES

Get objects from the internal SpaDES environment
loadPackages

Load packages.
packages

Get simulation package dependencies
paths

Specify paths for modules, inputs, and outputs
splitRaster

Split a raster into multiple tiles.
cir

Identify pixels in a circle around a SpatialPoints* object.
checksums

Calculate checksums for a module's data files
depsGraph

Build a module dependency graph
.fileTableIn

Create empty fileTable for inputs and outputs
.inputObjects

Create an empty (template) inputObjects and outputObjects data.frames
eventDiagram

Simulation event diagram
inputs

Inputs and outputs
newModule

Create new module from template.
specificNumPerPatch

specificNumPerPatch