Regarding communities, edges and edge-weights

Issue #396 resolved
Former user created an issue

Hello sir,

I have created community networks of a system. it shows it has 15 COMMUNITY NODES and corresponding 32 EDGES. i also got the 32 edge weights. But i could not get that the edge between which two nodes has the edge weight "x"(say). I mean lets say out of 32 edge weights one is 0.68. Now i want to know that this weight 0.68 corresponds to the edge of which two COMMUNITY NODES.

i hope the query is understandable Here is the code

net < cna(cij)
print(net)   #it shows the community node and edges#
E(net$community.network)$weight

.please find the attachment, it contains the summary and edge-weight of node edges

thanks

Comments (3)

  1. Xinqiu Yao

    Hi,

    Simply typing E(net$community.network) will show you the node pairs of edges. For example,

    edges <- E(net$community.network)
    
    # to find nodes that make the edge #3
    edges[3]
    
    # to find nodes that make the edge with edge weight around 0.68
    wt <- round(edges$weight, 2)
    edges[which(wt == 0.68)]
    

    Is this what you want?

  2. Log in to comment