Learn R Programming

SpaDES.tools (version 0.1.1)

rbindlistDtDtpot: Internal helper

Description

Not for users. A function to setnames and rbindlist that is used 3 places in spread2.

Internal helpers for spread2

Usage

rbindlistDtDtpot(dt, dtPotential, returnFrom, needDistance, dtPotentialColNames)

reorderColsWDistance(needDistance, dtPotential, dtPotentialColNames)

angleQuality(from, to, landscape, actualAsymmetryAngle)

asymmetryAdjust(angleQualities, quantity, actualAsymmetry)

Arguments

dt

Data.table

dtPotential

Data.table

returnFrom

Logical

needDistance

Logical

dtPotentialColNames

Character Vector.

from

vector of cell locations which are the "from" or starting cells

to

vector of same length as from which are the "to" or receiving cells

landscape

RasterLayer passed from spread2.

actualAsymmetryAngle

Angle in degrees, either a vector length 1 or vector NROW(dtPotential).

angleQualities

Matrix. The output from angleQuality

quantity

Variable of interest to adjust, e.g., spreadProb

actualAsymmetry

Asymmetry intensity. Derived from asymmetry arg in spread2