flowlowup {cartograflow} | R Documentation |
Extracts the triangular sub-matrix of flows
Description
Extracts the upper or lower triangular part of a matrix
Usage
flowlowup(tab, origin = NULL, destination = NULL, fij = NULL, lowup, format, x)
Arguments
tab |
is the input flow dataset |
origin |
the place of origin code |
destination |
the place of destination code |
fij |
the flow value between origin and destination places |
lowup |
for selecting lower or upper triangular sub-portion of the original matrix. See Details. |
format |
specify the flow dataset format, "M " for square matrix [n*n] or "L" for long [i,j,data] |
x |
enter the Enter the triangular part to be extracted: "low", "up". See Details. |
Details
This function compute for all pairs or origin-destination places (i,j)
a lower "low" or upper "up" triangular sub-portion of the original matrix
- x = "up" for the part above the main diagonal
- x = "low" for the part below the main diagonal
Examples
library(cartograflow)
data(flowdata)
###Extract the upper part of the matrix : Long format
tab_up <- flowlowup(flows, format="L", lowup="up")
tab_low<-flowlowup(flows, format="L", lowup="low")
[Package cartograflow version 1.0.5 Index]