Thank you! I had read that part, I just implemented it wrong and was getting an error, the example clarified it further and I successfully tried contracting a few more nodes.
I really appreciate your help and patience! Thank you! On Thu, Nov 8, 2012 at 7:20 AM, Tamás Nepusz <[email protected]> wrote: > > Of the vertices 1:26, I can also choose two nodes that are not > consecutive, as in, I can choose to merge (1,5) or (7,18) into a single > vertex. Can this be done? > > Quoting myself: > > > In general, if you want to merge vertex v into vertex u (assuming that v > > u), you will need a contraction vector as follows: > > > > vec <- c(1:(v-1), u, v:(vcount(g)-1)) > > > > If v < u, just swap u and v and do the same thing. > In your case, u=1 and v=5 (since you are merging node 5 into node 1), so > the contraction vector is: > > c(1:4, 1, 5:(vcount(g)-1)) > > Best, > Tamas > > > _______________________________________________ > 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
