Learn R Programming

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

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: http://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

1,270

Version

0.3.6

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Alex Chubaty

Last Published

June 23rd, 2020

Functions in SpaDES.tools (0.3.6)

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.
.findFactors

Find factors
dwrpnorm2

Vectorized wrapped normal density function
patchSize

Patch size
runifC

Rcpp Sugar version of runif
distanceFromEachPoint

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

Convert reduced representation to full raster
.pkgEnv

The SpaDES.tools package environment
directionFromEachPoint

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

Produce a raster of a random Gaussian process.
pointDistance2

Point distance with C++
randomPolygons

Produce a RasterLayer of random polygons
randomStudyArea

Create default study areas for use with SpaDES modules
testEquivalentMetadata

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

Resample
duplicatedInt

Rcpp duplicated on integers using Rcpp Sugar
.matchedPointDirection

Calculate matched point directions
middlePixel

Return the (approximate) middle pixel on a raster
spread

Simulate a spread process on a landscape.
heading

Heading between spatial points.
inRange

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

Internal helpers
initiateAgents

SELES - Initiate agents
mergeRaster

Split and re-merge RasterLayer(s)
spokes

Identify outward radiating spokes from initial points
specificNumPerPatch

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

spread2

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

Identifies all cells within a ring around the focal cells
wrap

Wrap coordinates or pixels in a torus-like fashion
spread3

An alternative spread function, conceived for insects
fastCrop

fastCrop is a wrapper around velox::VeloxRaster_crop, though raster::crop is faster under many tests.
adj

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

SELES - Agent Location at initiation
probInit

SELES - Probability of Initiation
SpaDES.tools-package

Categorized overview of the SpaDES.tools package
transitions

SELES - Transitioning to next time step
cir

Identify pixels in a circle or ring (donut) around an object.
move

Move
numAgents

SELES - Number of Agents to initiate