Description Usage Arguments Details Value See Also Examples
This function provides various indicators and graphical outputs on a flow matrix.
1 |
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. |
Graphical ouputs concern outdegrees by default. If the matrix is transposed, outputs concern indegrees.
The function returns a list of statistics and may plot graphics.
nblinks: number of cells with values > 0
density: number of links divided by number of possible links (also called gamma index by geographers), loops excluded
connectcomp: number of connected components (isolates included,
weakly connected: use of clusters
where mode = "weak")
connectcompx: number of connected components (isolates deleted,
weakly connected: use of clusters
where mode = "weak")
sizecomp: a data.frame of connected components: size and sum of flows per component (isolates included)
compocomp: a data.frame of connected components giving membership of units (isolates included)
degrees: a data.frame of nodes degrees and weighted degrees
sumflows: sum of flows
min: minimum flow
Q1: first quartile of flows
median: median flow
Q3: third quartile of flows
max: maximum flow
mean: mean flow
sd: standart deviation of flows
compmat
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.