dot-cardinalDistance: Movement of occupied cells in a given direction of a fixed...

.cardinalDistanceR Documentation

Movement of occupied cells in a given direction of a fixed point

Description

This function calculates the weighted distance moved by a mass represented by set of cells which fall north, south, east, or west of a given location (i.e., typically the centroid of the starting population). Values >0 confer movement to the north, south, east, or west of this location.

Usage

.cardinalDistance(
  direction,
  longOrLat,
  coordVect,
  x1,
  x2,
  refCoord,
  x1weightedLongs,
  x1weightedLats,
  x2weightedLongs,
  x2weightedLats,
  x1weightedElev = NULL,
  x2weightedElev = NULL
)

Arguments

direction

Any of: 'n' (north), 's' (south), 'e' (east), or 'w' (west).

longOrLat

Numeric matrix, latitude or longitudes. If direction is 'n' or 's' this must be latitudes. If direction is 'e' or 'w' this must be longitudes.

coordVect

Vector of latitude or longitude of cell centers, depending on value of longOrLat. If latitude, these must go from south to north. If longitude, these must go from west to east.

x1

Matrix of weights in time 1 (i.e., population size).

x2

Matrix of weights in time 2 (i.e., population size).

refCoord

Numeric, latitude or longitude (depending on longOrLat) of reference point from which to partition the weights into a northern, southern, eastern, or western portion.

x1weightedLongs

Matrix of longitudes weighted (i.e., by population size, given by x1).

x1weightedLats

Matrix of latitudes weighted (i.e., by population size, given by x1).

x2weightedLongs

Matrix of longitudes weighted (i.e., by population size, given by x2).

x2weightedLats

Matrix of latitudes weighted (i.e., by population size, given by x2).

x1weightedElev

Matrix of elevations weighted by x1 or NULL.

x2weightedElev

Matrix of elevations weighted by x2 or NULL.

refLat

Numeric, latitude of reference point.

Value

a list object with distance moved and abundance of all cells north/south/east/west of reference point.


adamlilith/enmSdm documentation built on Jan. 6, 2023, 11 a.m.