Again, you need to adjust parentheses. which(c1$csize < 8) & which(c1$csize > 2)
or whatever conditions you need. On Wed, Feb 4, 2015 at 7:16 PM, Benika H <[email protected]> wrote: > Hi again, > > I've recently ran the following code. > > c1 <- clusters(y) > c1$membership > layout <- layout.fruchterman.reingold(y) > x <- (which(c1$csize) < 8 & (c1$csize)> 1) > vertices <- which(c1$membership==x) > plot(subg,layout=layout[vertices]) > > When I do c1$csize, it tells me I should have 32 communities that fit that > range in x. > However, it only plots 4 vertices. > > Any ideas why??? > > On Wed, Feb 4, 2015 at 6:46 PM, Benika H <[email protected]> wrote: > >> It would still print the nodes outside that range. I think I just an >> error in my plot lines. >> >> Thanks for checking. Hopefully, this is the solution. >> >> Thanks everyone , >> >> Benika H >> >> On Wed, Feb 4, 2015 at 6:31 PM, Gábor Csárdi <[email protected]> >> wrote: >> >>> 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 <[email protected]> >>> 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 >>>> [email protected] >>>> https://lists.nongnu.org/mailman/listinfo/igraph-help >>>> >>>> >>> >>> _______________________________________________ >>> igraph-help mailing list >>> [email protected] >>> https://lists.nongnu.org/mailman/listinfo/igraph-help >>> >>> >> > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > >
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
