statmat: Descriptive Statistics on Flow Matrix

Description Usage Arguments Details Value See Also Examples

Description

This function provides various indicators and graphical outputs on a flow matrix.

Usage

1
statmat(mat, output = "all", verbose = TRUE)

Arguments

mat

A square matrix of flows.

output

Graphical output. Choices are "all" for all graphics, "none" to avoid any graphical output, "degree" for degree distribution, "wdegree" for weighted degree distribution, "lorenz" for Lorenz curve of link weights and "boxplot" for boxplot of link weights (see 'Details').

verbose

A boolean, if TRUE, returns statistics in the console.

Details

Graphical ouputs concern outdegrees by default. If the matrix is transposed, outputs concern indegrees.

Value

The function returns a list of statistics and may plot graphics.

See Also

compmat

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Import data
data(nav)
myflows <- prepflows(mat = nav, i = "i", j = "j", fij = "fij")

# Get statistics and graphs about the matrix
mystats <- statmat(mat = myflows, output = "all", verbose = TRUE)

# Size of connected components
mystats$sizecomp

# Sum of flows
mystats$sumflows

# Plot Lorenz curve only
statmat(mat = myflows, output = "lorenz", verbose = FALSE)

# Statistics only
mystats <- statmat(mat = myflows, output = "none", verbose = FALSE)
str(mystats)

flows documentation built on May 2, 2019, 7:25 a.m.