prepflows

0th

Percentile

Flows Preparation

From a long format matrix to a a wide format matrix.

Usage
prepflows(mat, i, j, fij)
Arguments
mat
A data.frame of flows between origins and destinations: long format matrix (origins, destinations, flows intensity).
i
A character giving the origin field name in mat.
j
A character giving the destination field name in mat.
fij
A character giving the flow field name in mat.
Value

A square matrix of flows. Diagonal can be filled or empty depending on data used.

Aliases
  • prepflows
Examples
# Import data
data(nav)
head(nav)
# Prepare data
myflows <- prepflows(mat = nav, i = "i", j = "j", fij = "fij")
myflows[1:5,1:5]
Documentation reproduced from package flows, version 1.1.1, License: GPL-3

Community examples

Looks like there are no examples yet.