ttt_flowmapper_types: ttt_flowmapper_types: Compute gross and net flows

View source: R/ttt_flowmapper_types.R

ttt_flowmapper_typesR Documentation

ttt_flowmapper_types: Compute gross and net flows

Description

Compute gross (symmetric) and net (antisymetric) flows from initial asymetric matrix

Usage

ttt_flowmapper_types(
  tab,
  origin = NULL,
  destination = NULL,
  fij = NULL,
  format,
  type,
  lowup,
  net
)

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

format

specify the flow dataset format, "M " for square matrix or "L" for long [i,j,data]

type

enter the flowtype : "gross" or "net". See Details.

lowup

for extracting the lower or upper triangular sub-portion of the gross matrix. See Details.

net

for extracting the "positive" or the "negative" flow values of the net matrix

Details

Type of flow are:
- type = "gross" for building the gross matrix - as bilateral volum
- type = "net" for building the net matrix - as bilateral balance
Lowup part of the matrix are:
- lowup ="up" for triangular part above the main diagonal
- lowup = "low" for triangular part below the main diagonal

References

Waldo R. Tobler, 1979, A geographical flow mapping program, Geographical Analysis, n°13, Vol. 1, pp. 1-20

Examples

#Example 1 : building gross flows
gross_up<-ttt_flowmapper_types(data, origin="i",destination="j",fij="fij", format="L", type="gross",lowup="up")
#Example 2 : building net flows net_positive <-ttt_flowmapper_types(data,origin="i",destination="j",fij="fij",format="L",type="net",net="positive")

tributetotobler/ttt documentation built on Sept. 15, 2022, 5:41 p.m.