Below is a snapshot of the Web page as it appeared on 4/7/2011 (the last time our crawler visited it). This is the version of the page that was used for ranking your search results. The page may have changed since we last cached it. To see what might have changed (without the highlights), go to the current page.
Bing is not responsible for the content of this page.
APBRmetrics :: View topic - Using R to calculate "Betweenness" of a la
APBRmetrics Forum Index APBRmetrics
The statistical revolution will not be televised.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using R to calculate "Betweenness" of a la

 
Post new topic   Reply to topic    APBRmetrics Forum Index -> General discussion
View previous topic :: View next topic  
Author Message
spurusho



Joined: 18 Jul 2008
Posts: 2

PostPosted: Sat Jul 19, 2008 5:01 pm    Post subject: Using R to calculate "Betweenness" of a la Reply with quote

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
View user's profile Send private message
Ryan J. Parker



Joined: 23 Mar 2007
Posts: 711
Location: Raleigh, NC

PostPosted: Sat Jul 19, 2008 5:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Ed Küpfer



Joined: 30 Dec 2004
Posts: 787
Location: Toronto

PostPosted: Sun Jul 20, 2008 2:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
dsparks



Joined: 22 Feb 2008
Posts: 61

PostPosted: Mon Jul 21, 2008 12:12 pm    Post subject: Reply with quote

Though I have not used it, there is apparently a function for calculating betweenness in the package igraph: http://cneurocvs.rmki.kfki.hu/igraph/doc/R/betweenness.html

It looks pretty straightforward. The SNA package, which I have used, also has a betweenness() function. http://cran.r-project.org/web/packages/sna/index.html
_________________
David

http://arbitrarian.wordpress.com
Back to top
View user's profile Send private message
spurusho



Joined: 18 Jul 2008
Posts: 2

PostPosted: Tue Jul 22, 2008 3:41 pm    Post subject: Thanks a lot for the suggestions guys Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    APBRmetrics Forum Index -> General discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group