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 utilites 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) # stable

Development version (unstable)

Install from GitHub:

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

Copy Link

Version

Install

install.packages('SpaDES.tools')

Monthly Downloads

1,270

Version

0.2.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Alex Chubaty

Last Published

June 18th, 2018

Functions in SpaDES.tools (0.2.0)

distanceFromEachPoint

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

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

Produce a raster of a random Gaussian process.
spokes

Identify outward radiating spokes from initial points
heading

Heading between spatial points.
resample

mergeRaster

Split and re-merge RasterLayer(s)
runifC

Rcpp Sugar version of runif
.findFactors

Find factors
spread

Simulate a spread process on a landscape.
patchSize

Patch size
rings

Identifies all cells within a ring around the focal cells
sampleV

Resample
rasterizeReduced

Convert reduced representation to full raster
wrap

Wrap coordinates or pixels in a torus-like fashion
spread2

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

Internal helper
.pkgEnv

The SpaDES.tools package environment
agentLocation

SELES - Agent Location at initiation
move

Move
cir

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

SELES - Number of Agents to initiate
checkGDALVersion

Deprecated functions
directionFromEachPoint

Calculate distances and directions between many points and many grid cells
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 xy coordinates of every locus
inRange

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

randomPolygons
initiateAgents

SELES - Initiate agents
SpaDES.tools-package

Categorized overview of the SpaDES.tools package
adj.raw

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

Point distance with C++
duplicatedInt

Rcpp duplicated on integers using Rcpp Sugar
%fin%

A faster '%in%' based on fastmatch package
.matchedPointDirection

Calculate matched point directions
probInit

SELES - Probability of Initiation
transitions

SELES - Transitioning to next time step
dwrpnorm2

Vectorized wrapped normal density function