igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Get communities with less than 8 nodes then remove isolates


From: Gábor Csárdi
Subject: Re: [igraph] Get communities with less than 8 nodes then remove isolates
Date: Wed, 4 Feb 2015 18:31:23 -0500

What's wrong with my off list suggestion. Doesn't 

right_size <- which(sizes(wc) < 8 & sizes(wc) > 1)
subg <- induced.subgraph(y, which(membership(wc) %in% right_size))

work?

G.

On Wed, Feb 4, 2015 at 2:09 PM, Benika H <address@hidden> wrote:
Hi,

I am trying to get all of the communities that have less than 8 nodes but more than 1 node.

I've tried many things thus far.

Immediate help is needed.

Here is what I'm trying now:

y <- graph.data.frame(t, directed=FALSE)
z <- graph.data.frame(u, directed=FALSE)
wc <- walktrap.community(y, weights = edgeList$Weight, steps=6, merges =TRUE, modularity = TRUE, membership = TRUE)

x <- which(sizes(wc) < 8  & sizes(wc) >1)
x
subg <-induced.subgraph(y,which(membership(wc) == x))


I've also tried the methods cliques, clusters and decompose.

Beni

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



reply via email to

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