[R] SNA packages/network package

Seth Falcon sfalcon at fhcrc.org
Fri Nov 24 18:30:15 CET 2006


> Bagatti Davide wrote:
>> Hello everyone,
>>
>> I am an italian student who is working with packages SNA (social network
>> analysis) and network.
>> I ask  you if there is a simple way to write a R-script using these packages
>> to extract from an adjacency matrix the following things:
>>
>> -number of cliques which are in the network;
>> -number of k-cores (e.g. 3-cores, 4-cores);
>> -cycles (e.g. 3-cycles, 4-cycles)
>> -hub & authorities.

You might take a look at the 'graph' and 'RBGL' packages (both are
Bioconductor packages).  

There is a graphAM class that can be initialized with an adjacency
matrix.  Most functions in RBGL take either any graph instance or a
graphNEL.  So you might have (approx. and untested):

library(graph)
library(RBGL)
myAdjMat
g1 = new("graphAM", myAdjMat)
g2 = as(g1, "graphNEL")
## call some RBGL function on g2

+ seth



More information about the R-help mailing list