igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Between-class network statistics


From: Scott Chui
Subject: [igraph] Between-class network statistics
Date: Tue, 18 Feb 2020 19:06:12 +0800

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]