igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Subgraph with members of communities with size > 20


From: Frederik Elwert
Subject: Re: [igraph] Subgraph with members of communities with size > 20
Date: Sun, 24 Nov 2013 13:19:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

Am So 24 Nov 2013 10:37:26 CET schrieb address@hidden:
> I am trying to subgraph a graph (g) including only members of
> communities of size 20 or bigger.
>
> This is my code but I am getting something wrong
>
>      id_communities <- which(sizes(gc.fastgreedy)>20)
>      subg <- induced.subgraph(g, which(membership(communities) ==
> id_communities))

Maybe you need "%in%" instead of "==":

subg <- induced.subgraph(g, which(membership(communities) %in%  
id_communities))

Frederik



reply via email to

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