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

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Alex M Chubaty

Last Published

February 1st, 2018

Functions in SpaDES.tools (0.1.1)

SpaDES.tools-package

Categorized overview of the SpaDES.tools package
%fin%

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

Calculate matched point directions
sampleV

Resample
specificNumPerPatch

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

SELES - Agent Location at initiation
numAgents

SELES - Number of Agents to initiate
pointDistance2

Point distance with C++
transitions

SELES - Transitioning to next time step
duplicatedInt

Rcpp duplicated on integers using Rcpp Sugar
probInit

SELES - Probability of Initiation
prepInputs

Download and optionally reproject, crop, mask raw data and output module inputs
randomPolygons

randomPolygons
spread

Simulate a spread process on a landscape.
rbindlistDtDtpot

Internal helper
extractFromArchive

Extract files from archive.
fastCrop

fastCrop
patchSize

Patch size
.pkgEnv

The SpaDES.tools package environment
move

Move
directionFromEachPoint

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

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

Split and re-merge RasterLayer(s)
initiateAgents

SELES - Initiate agents
resample

rings

Identifies all cells within a ring around the focal cells
spokes

Identify outward radiating spokes from initial points
cirSpecialQuick

This is a very fast version of cir with allowOverlap = TRUE, allowDuplicates = FALSE, returnIndices = TRUE, returnDistancse = TRUE, and includeBehaviour = "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
cir

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

Faster operations on rasters
.findFactors

Find factors
rasterizeReduced

Convert reduced representation to full raster
runifC

Rcpp Sugar version of runif
spread2

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

Wrap coordinates or pixels in a torus-like fashion
adj.raw

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

Produce a raster of a random Gaussian process.
heading

Heading between spatial points.