- graph
data.frame
or equivalent object representing the network
graph (see Details)
- from
Vector or matrix of points from which route distances are to
be calculated, specified as one of the following:
Single character vector precisely matching node numbers or names
given in graph$from
or graph$to
.
Single vector of integer-ish values, in which case these will be
presumed to specify indices into dodgr_vertices, and NOT to
correspond to values in the 'from' or 'to' columns of the graph. See the
example below for a demonstration.
Matrix or equivalent of longitude and latitude coordinates, in which
case these will be matched on to the nearest coordinates of 'from' and 'to'
points in the graph.
- to
Vector or matrix of points to which route distances are to be
calculated. If to
is NULL
, pairwise distances will be calculated from
all from
points to all other nodes in graph
. If both from
and to
are
NULL
, pairwise distances are calculated between all nodes in graph
.
- k
Width of exponential spatial interaction function (exp (-d / k)),
in units of 'd', specified in one of 3 forms: (i) a single value; (ii) a
vector of independent values for each origin point (with same length as
'from' points); or (iii) an equivalent matrix with each column holding values
for each 'from' point, so 'nrow(k)==length(from)'. See Note.
- dens_from
Vector of densities at origin ('from') points
- dens_to
Vector of densities at destination ('to') points
- contract
If TRUE
(default), calculate flows on contracted graph
before mapping them back on to the original full graph (recommended as this
will generally be much faster). FALSE
should only be used if the graph
has already been contracted.
- norm_sums
Standardise sums from all origin points, so sum of flows
throughout entire network equals sum of densities from all origins (see
Note).
- heap
Type of heap to use in priority queue. Options include
Fibonacci Heap (default; FHeap
), Binary Heap (BHeap
),
Trinomial Heap (TriHeap
), Extended Trinomial Heap
(TriHeapExt
, and 2-3 Heap (Heap23
).
- tol
Relative tolerance below which flows towards to
vertices are not
considered. This will generally have no effect, but can provide speed gains
when flow matrices represent spatial interaction models, in which case this
parameter effectively reduces the radius from each from
point over which
flows are aggregated. To remove any such effect, set tol = 0
.
- quiet
If FALSE
, display progress messages on screen.