igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Clusters in Graph


From: Gábor Csárdi
Subject: Re: [igraph] Clusters in Graph
Date: Tue, 3 Nov 2009 19:25:05 +0100

Hello Surendar,

graphs <- decompose.graph(G)
tab <- data.frame(V=sapply(graphs, vcount), E=sapply(graphs, ecount))
tab
write.csv(tab, file="tab.xls")

Best,
G.

On Tue, Nov 3, 2009 at 7:20 PM, Surendar Swaminathan
<address@hidden> wrote:
> Hello Tamas,
>
>  Thank you very much.I apologise for replying lte it did work and also
> I tried no.clusters and it gave me the same result. I tried different
> option to output the result in excel or some format. What I intend to
> do was find the distribution of each clusters. Number of nodes and
> number of edges in each cluster. Is there anyway I can output the
> result in easy format for me to read.
>
> Surendar
>
> On Mon, Nov 2, 2009 at 7:51 AM, Tamas Nepusz <address@hidden> wrote:
>> Hi Surendar,
>>
>> If you are looking for the connected components of a graph, check the
>> help page for the following commands:
>>
>>> ?clusters
>>> ?decompose.graph
>>
>> "clusters" will give you a numeric vector which contains N elements (N
>> is the number of nodes in your graph). Each element of this vector is
>> the cluster index of the corresponding node; nodes in cluster X will
>> have X in the corresponding position in the membership vector.
>>
>> "decompose.graph" will take the original graph and return a list of
>> graphs, each corresponding to one component of your original graph.
>>
>> --
>> Tamas
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]