igraph-help
[Top][All Lists]
Advanced

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

[igraph] Calculating betweenness


From: Rachael Mady
Subject: [igraph] Calculating betweenness
Date: Sun, 4 Dec 2016 20:38:40 -0500

Hello,

I am trying to calculate betweenness for an association matrix. 

I have successfully calculated it for a binary association matrix. 
However, I owuld like to also calcualte it for a weighted association matrix. 

Unfortunately I run into this error: 
Error in .Call("R_igraph_closeness", graph, vids - 1, mode, weights, normalized,  : 
  At centrality.c:2507 : Invalid weight vector length, Invalid value

This is the original code that worked: 
  measure3 <- as.numeric(betweenness(graphN, v=V(graphN), directed = F, weights = NULL, nobigint = TRUE, normalized = TRUE))

This is my modified code that uses a weighted matrix: 
   measure3 <- as.numeric(betweenness(graph, v=V(graph), directed = F, weights = NULL, nobigint = TRUE, normalized = TRUE))

Any help is appreciated!
Rachael 


reply via email to

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