Learn R Programming

SpaDES.tools

Additional modelling tools for Spatial Discrete Event Simulation (SpaDES) module development.

Provides GIS/map utilities and additional modeling tools for developing cellular automata and agent based models in SpaDES.

Website: https://SpaDES.PredictiveEcology.org

Wiki: https://github.com/PredictiveEcology/SpaDES/wiki

Installation

Building packages from source requires the appropriate development libraries for your operating system (e.g., Windows users should install Rtools).

Current stable release

Install from CRAN:

install.packages("SpaDES.tools")

Install from GitHub:

#install.packages("devtools")
library("devtools")
install_github("PredictiveEcology/SpaDES.tools", dependencies = TRUE) # master

Development version (unstable)

Install from GitHub:

#install.packages("devtools")
library("devtools")
install_github("PredictiveEcology/SpaDES.tools", ref = "development", dependencies = TRUE)

Contributions

Please see CONTRIBUTING.md for information on how to contribute to this project.

Copy Link

Version

Install

install.packages('SpaDES.tools')

Monthly Downloads

2,066

Version

2.0.6

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Alex M Chubaty

Last Published

April 15th, 2024

Functions in SpaDES.tools (2.0.6)

.findFactors

Find factors
inRange

Test whether a number lies within range [a,b]
initiateAgents

SELES - Initiate agents
dwrpnorm2

Vectorized wrapped normal density function
.pointDistance

Alternative point distance (and direction) calculations
heading

Heading between spatial points.
gaussMap

Produce a raster of a random Gaussian process.
distanceFromEachPoint

Calculate distances and directions between many points and many grid cells
directionFromEachPoint

Calculate distances and directions between many points and many grid cells
neutralLandscapeMap

Produce a neutral landscape using a midpoint displacement algorithm
duplicatedInt

Rcpp duplicated on integers using Rcpp Sugar
patchSize

Patch size
randomPolygons

Produce a SpatRaster of random polygons
runifC

Rcpp Sugar version of runif
resample

.pkgEnv

The SpaDES.tools package environment
middlePixel

Return the (approximate) middle pixel on a raster
randomStudyArea

Create default study areas for use with SpaDES modules
.matchedPointDirection

Calculate matched point directions
rasterizeReduced

Convert reduced representation to full raster
sampleV

Resample
testEquivalentMetadata

Test that metadata of 2 or more objects is the same
rbindlistDtDtpot

Internal helpers
specificNumPerPatch

Initiate a specific number of agents in a map of patches
wrap

Wrap coordinates or pixels in a torus-like fashion
mergeRaster

Split and re-merge RasterLayer(s)
spread3

An alternative spread function, conceived for insects
rings

Identifies all cells within a ring around the focal cells
spread

Simulate a spread process on a landscape.
spread2

Simulate a contagious spread process on a landscape, with data.table internals
spokes

Identify outward radiating spokes from initial points
SpaDES.tools-package

Categorized overview of the SpaDES.tools package
numAgents

SELES - Number of Agents to initiate
transitions

SELES - Transitioning to next time step
cir

Identify pixels in a circle or ring (doughnut) around an object.
probInit

SELES - Probability of Initiation
move

Move
cirSpecialQuick

This is a very fast version of cir with allowOverlap = TRUE, allowDuplicates = FALSE, returnIndices = TRUE, returnDistances = TRUE, and includeBehavior = "excludePixels". It is used inside spread2, when asymmetry is active. The basic algorithm is to run cir just once, then add to the x,y coordinates of every locus.
fastCrop

fastCrop is deprecated.
agentLocation

SELES - Agent Location at initiation
adj

Fast adjacent function, and Just In Time compiled version