Hello, I am using igraph version 1.2.4.2 in R 3.5.2 on macOS 10.13 to analyse network data. The vertices have categorical attributes like “Sex” and “Age_class”, while the edges are undirected and weighted. I imported the adjacency matrix and attached the vertex attributes using the “set_vertex_attr” command. I would like to calculate network metrics such as betweenness and strength not only of the global network, but also between and within the attribute classes, i.e. to calculate betweenness of the weighted connection between female—female or male—female.
I am able to calculated the within-class network statistics by removing vertices of other attribute class, e.g. >gM <- delete.vertices(g, V(g)[Sex != "M”]) ## network of only males >betweenness(gM, direction = F) ## betweenness of M—M However, this method does not work on between-class statistics, I would like to know how can I calculate between-class statistics in igraph, thank you. Best, Scott _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
