View previous topic :: View next topic |
Author |
Message |
spurusho
Joined: 18 Jul 2008 Posts: 2
|
Posted: Sat Jul 19, 2008 5:01 pm Post subject: Using R to calculate "Betweenness" of a la |
|
|
Hello,
I am calculating 'Betweenness' of a large network using R. Currently, I
have the node-node information (City1-City2) in an excel file, present
in two columns where column A has City1 and column B has City2 that
city1 is connected to. These are the steps that I go through to
calculate betweenness of my network.
a) Convert the City1-City2 (text) into Number1-Number2 in the excel file
where every unique city has a unique number.
b) Paste all the city-city information separated by comma into c(...) in
the R GUI to obtain the corresponding vectors. As you can imagine this
copy-paste operation takes a long time. Example: c(1,3,1,5,2,4,2,5).
Just fyi, I have a text file that contains all nodes separated by comma
based on the appropriate link information.
c) Then, I create a graph file with the above vector.
d) I use the graph file to calculate betweenness of my network.
I am sure there must be a better, more efficient way to calculate
betweenness. Ideally, I would like to just have the City1 - City2 (link)
information in two columns in an excel file and calculate the
betweenness from that file directly.
Please provide an optimal solution for this problem. I appreciate your
time and help.
Thanks,
Senthil
________
Ferrari Modulo specifications
Last edited by spurusho on Thu Feb 03, 2011 11:21 pm; edited 1 time in total |
|
Back to top |
|
|
Ryan J. Parker
Joined: 23 Mar 2007 Posts: 711 Location: Raleigh, NC
|
Posted: Sat Jul 19, 2008 5:04 pm Post subject: |
|
|
Although some of us here are familiar with R, I'd strongly suggest you try the R mailing lists: http://www.r-project.org/mail.html.
I'm sure they will help give you the "optimal solution" you seek. |
|
Back to top |
|
|
Ed Küpfer
Joined: 30 Dec 2004 Posts: 787 Location: Toronto
|
Posted: Sun Jul 20, 2008 2:04 am Post subject: |
|
|
I'm willing to help out (to the extent that I can), but I don't understand your betweenness and network termilnology. Can you spell out your data and your goal with more detail? _________________ ed |
|
Back to top |
|
|
dsparks
Joined: 22 Feb 2008 Posts: 61
|
|
Back to top |
|
|
spurusho
Joined: 18 Jul 2008 Posts: 2
|
Posted: Tue Jul 22, 2008 3:41 pm Post subject: Thanks a lot for the suggestions guys |
|
|
I am talking to the experts in the CRAN project. The problem with the SNA package that I use in R is that the input has to be an array or an adjacency matrix and I am talking about 50,000 nodes and 450,000 links. R just crashes when I try to create an adjacency matrix for a large network.
I hope to get a solution from the other folks. I will definitely keep you all posted. Thanks for the time and effort.
________
vapor tower |
|
Back to top |
|
|
|