sum_od {migest} | R Documentation |
Extract a classic origin-destination migration flow matrix.
Description
Extract a classic origin-destination migration flow matrix from a more detailed dis-aggregation of flows stored in an (array
).
Primarily intended to work with output from ffs_demo
.
Usage
sum_od(x = NULL, zero_diag = TRUE, add_margins = TRUE)
Arguments
x |
Array of origin-destination matrices, where the first and second dimensions correspond to origin and destination respectively. Higher dimension(s) refer to additional migrant characteristic(s). |
zero_diag |
Logical to indicate if to set diagonal terms to zero. Default |
add_margins |
Logical to indicate if to add row and column for immigration and emigration totals. Default |
Value
Matrix from summing over the first and second dimension. Set diagonals to zero.
Returns a matrix
object of origin-destination flows
See Also
[Package migest version 2.0.4 Index]