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

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Alex Chubaty

Last Published

July 14th, 2018

Functions in SpaDES.tools (0.3.0)

%fin%

A faster '%in%' based on fastmatch package
gaussMap

Produce a raster of a random Gaussian process.
rings

Identifies all cells within a ring around the focal cells
.matchedPointDirection

Calculate matched point directions
rasterizeReduced

Convert reduced representation to full raster
heading

Heading between spatial points.
wrap

Wrap coordinates or pixels in a torus-like fashion
randomPolygons

randomPolygons
patchSize

Patch size
specificNumPerPatch

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

Identify outward radiating spokes from initial points
.pkgEnv

The SpaDES.tools package environment
mergeRaster

Split and re-merge RasterLayer(s)
spread

Simulate a spread process on a landscape.
rbindlistDtDtpot

Internal helper
spread2

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

Rcpp Sugar version of runif
resample

sampleV

Resample
numAgents

SELES - Number of Agents to initiate
agentLocation

SELES - Agent Location at initiation
move

Move
fastCrop

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

SELES - Transitioning to next time step
cir

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

Fast `adjacent` function, and Just In Time compiled version
SpaDES.tools-package

Categorized overview of the SpaDES.tools package
probInit

SELES - Probability of Initiation
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
pointDistance2

Point distance with C++
duplicatedInt

Rcpp duplicated on integers using Rcpp Sugar
inRange

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

SELES - Initiate agents
dwrpnorm2

Vectorized wrapped normal density function
.findFactors

Find factors
directionFromEachPoint

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

Calculate distances and directions between many points and many grid cells