Skip to contents

Dyad-level indices

Here are the functions for several of the dyad-level indices you will want to use in this course.

Explore the dyads
shortest path for a given set of vertics
snafun
igraph
igraph::all_shortest_paths(g, from = IDofVertex, to = igraph::V(g), mode = 'out')
network
Geodesic lengths1
snafun
snafun::d_distance(x, mode = c("all", "out", "in"))
igraph
igraph::distances(g, mode = 'out')
network
sna::geodist(g, count.paths = TRUE)$counts
Structural equivalence
snafun
snafun::d_structural_equivalence(x, weights = NA, digits = 3, suppressWarnings = TRUE)
igraph
network
sna::sedist(g, method = "correlation", mode ="digraph", diag=FALSE)
Edge betweenness
snafun
igraph
igraph::edge.betweenness(g, directed = FALSE)
network
1 The output is a table with an entry per vertex pair