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