[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] getting the graph of the maximum component
From: |
Martin Tomko |
Subject: |
[igraph] getting the graph of the maximum component |
Date: |
Sat, 07 Aug 2010 15:20:02 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 |
Hi All,
I have a graph that consists of many disconnected components (subgraphs,
or clusters...).
I am interested in working with the maximum one.
I figured the following approach to identify it in the csize frame of
the clusters function :
c<-clusters(g)
which.max(c$csize)
I would like to get it as a graph object. trying the following failed:
gg<-c[which.max(c$csize)]
seems like decompose.graph could help, but I am wondering what's the
easiest way to identify and get the largest component from this output.
The documentation claims that the result of decompose.graph(g) is a list
of graph objects, but this fails:
f<-decompose.graph(g)
ff<-f[1]
length(V(ff)) claiming that ff is not a graph object (typeof shows that
it is a list of graph objects).
Thanks
Martin
- [igraph] peeling off graphs - minimum spanning tree traversal, Martin Tomko, 2010/08/06
- Re: [igraph] peeling off graphs - minimum spanning tree traversal, Tamas Nepusz, 2010/08/06
- [igraph] getting the graph of the maximum component,
Martin Tomko <=
- Re: [igraph] getting the graph of the maximum component, Claudia Muller-Birn, 2010/08/08
- Re: [igraph] getting the graph of the maximum component, Gábor Csárdi, 2010/08/08
- Re: [igraph] getting the graph of the maximum component, Martin Tomko, 2010/08/09
- Re: [igraph] getting the graph of the maximum component, Gábor Csárdi, 2010/08/09
- Re: [igraph] getting the graph of the maximum component, Martin Tomko, 2010/08/09
- Re: [igraph] getting the graph of the maximum component, Gábor Csárdi, 2010/08/09
- Re: [igraph] getting the graph of the maximum component, Martin Tomko, 2010/08/09
- Re: [igraph] getting the graph of the maximum component, Gábor Csárdi, 2010/08/09
- Re: [igraph] getting the graph of the maximum component, Martin Tomko, 2010/08/09
Re: [igraph] peeling off graphs - minimum spanning tree traversal, Martin Tomko, 2010/08/08