SpaDES logo

1 Spatial spreading/distances methods

Spatial contagion is a key phenomenon for spatially explicit simulation models. Contagion can be modelled using discrete approaches or continuous approaches. Several functions assist with these:

adjAn optimized (i.e., faster) version of adjacent
cirIdentify pixels in a circle around a SpatialPoints* object
directionFromEachPointFast calculation of direction and distance surfaces
distanceFromEachPointFast calculation of distance surfaces
ringsIdentify rings around focal cells (e.g., buffers and donuts)
spokesTO DO: need description
spreadContagious cellular automata
wrapCreate a torus from a grid

2 Spatial agent methods

Agents have several methods and functions specific to them:

crwSimple correlated random walk function
headingDetermines the heading between SpatialPoints*
makeLinesMakes SpatialLines object for, e.g., drawing arrows
moveA meta function that can currently only take "crw"
specificNumPerPatchInitiate a specific number of agents per patch

3 GIS operations

In addition to the vast amount of GIS operations available in R (mostly from contributed packages such as sp, raster, maps, maptools and many others), we provide the following GIS-related functions:

equalExtentAssess whether a list of extents are all equal

4 Map-reduce - type operations

These functions convert between reduced and mapped representations of the same data. This allows compact representation of, e.g., rasters that have many individual pixels that share identical information.

rasterizeReducedConvert reduced representation to full raster

5 Random Map Generation

It is often useful to build dummy maps with which to build simulation models before all data are available. These dummy maps can later be replaced with actual data maps.

gaussMapCreates a random map using Gaussian random fields
randomPolygonsCreates a random polygon with specified number of classes

6 SELES-type approach to simulation

These functions are essentially skeletons and are not fully implemented. They are intended to make translations from SELES. You must know how to use SELES for these to be useful:

agentLocationAgent location
initiateAgentsInitiate agents into a SpatialPointsDataFrame
numAgentsNumber of agents
probInitProbability of initiating an agent or event
transitionsTransition probability

7 Package options

SpaDES packages use the following options to configure behaviour:

  • spades.lowMemory: If true, some functions will use more memory efficient (but slower) algorithms. Default FALSE.

See also