flowtabmat {cartograflow} | R Documentation |
Changing the format of a flow dataset
Description
Transform a flow dataset from long to matrice format, and vice versa. Square matrice.
Usage
flowtabmat(tab, matlist)
Arguments
tab |
flow dasaset, in matrice or long format |
matlist |
choose "matrice" or "long" for the resulting format. See Details. |
Details
- matlist="M" from long (3 columns : origin, destination, flow) to matrice format [n*n];
- matlist="L" from matrice to long format.
Value
a flow dataset in matrice or in long format
Examples
library(cartograflow)
data(flowdata)
# 1: From long to matrix format (n*m)
matFlow <- flowtabmat(flows, matlist = "M")
# 2: From matrix to long format [i,j,Fij]
listflow <- flowtabmat(matFlow, matlist = "L")
[Package cartograflow version 1.0.5 Index]