Hi, I'm not that familar with R, but it seems that igraph has a "make_clusters()" function in R that allows you to construct a "communities" object from a graph and a membership vector where the i-th element of the membership vector is simply the community index of vertex i. So, if you can convert the output to a single R vector, the rest should be easy.
Alternatively, make_clusters() can also take a "merge matrix" for hierarchical community detection algorithms. A merge matrix is a matrix with 2 columns and N rows and each row describes the merge of two communities into a larger one. The initial vertices of the graph are identified by integers 1..|V| in the matrix; then the community that is created by the first merge is identified by |V|+1, the community created by the second merge is identified by |V|+2 and so on. T. On Wed, Mar 23, 2016 at 6:06 PM, Alexander Struck <[email protected]> wrote: > Thank you Tamas for looking into this. > > Has anybody else any pointer for me how to transform Infomap output into > something that I can use with igraph-R? I’d really like to keep using igraph > for further research in this project. > > Best regards, > > Alexander > >> On 23 Mar 2016, at 12:09, Tamas Nepusz <[email protected]> wrote: >> >> Hi, >> >> I don't think there is a built-in igraph function to convert the .tree >> output format of the code on mapequation.org to an igraph communities >> object. >> T. >> >> >> On Mon, Mar 21, 2016 at 6:51 PM, Alexander Struck >> <[email protected]> wrote: >>> Hi GuRus, >>> >>> I had to use the Infomap implementation from >>> http://mapequation.org/code.html and created a .tree text file. I must have >>> been using the wrong search terms but couldn’t find information on how to >>> turn that .tree structure into an igraph communities object. Which >>> transformation steps / options did I miss? I’d appreciate any hints. >>> >>> Many thanks, >>> >>> Alexander > > > > > _______________________________________________ > 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
