Function creates a mixing matrix by graph vertex attribute.
mixmat(g, attrib, use_density = TRUE)
igraph graph object.
Character string. Vertex attribute or category.
Logical. Use edge density. Default is TRUE
.
A mixing matrix.
Mixing matrix original function written by Gary Weissman. See: https://gist.github.com/gweissman/2402741.
if (FALSE) {
# create a mixing matrix of the demonstration network based on vertex
# categorical attribute for political stance "vosonCA_Stance"
g <- loadPackageGraph("DividedTheyBlog_40Alist_release.graphml")
mm <- mixmat(g, "vosonCA_Stance", use_density = FALSE)
}