|
From: | Marco Antoniazzi |
Subject: | Re: [igraph] Betweenness in weighted adjacency matrix |
Date: | Fri, 3 May 2013 15:38:35 +0200 |
Hi,
How come that your input file is not a square matrix? It seems to have 8 rows and 13 columns -- where are the 5 missing rows and the 5 missing node names?
> Import the txt file which looks as following (The first row specifies the code for the different nodes, the other rows specifies the weights of edges).
Otherwise what you do seems okay for me.
igraph doesn't care -- it does not read your file, it reads the matrix that you loaded with read.table. If the matrix looks fine in R, then it should be okay for igraph as well.
> IS it ok for igraph to have the name of the nodes just in the first row and not in the first column to generate an adjacency matrix? i have read somewhere it is the same as having the first column with 'A','B','C',etc
Seems okay for me, assuming that your input matrix is correct -- which is still a bit weird for me because of the missing rows.
> I want then to calculate the betweenness, that will return a result for each node, but I am not sure whether the weights are inserted correctly in the function.
Of course -- find another program that can calculate weighted betweenness scores and compare the results ;) One possible option is the NetworkX module for Python if you know the Python language. (igraph also has a Python interface but it would be quite useless to compare igraph in Python vs igraph in R because they use the same implementation).
> Is there a way I can check the results using other programs?
--
T.
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |