igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] : Infomap


From: Chris Watson
Subject: Re: [igraph] : Infomap
Date: Thu, 27 Nov 2014 19:22:58 -0500

Use a list instead, for the output in the "for" loop.

On Thu, Nov 27, 2014 at 6:09 PM, patricia <address@hidden> wrote:
Hello,

Please explain to me how to do the following:

communities <- infomap.community (g)
n_communities <- sizes (communities)

I want to create a repeating loop using R, which varies from 1 to sizes (communities) and assign the vertices contained in the community consulted the array named MatrixOfCommunities. I used the code below, but got the following error message:

for (lines in 1: n_communities)
{
             MatrixOfCommunities [lines,    ] <- V (g) [membership (communities) == lines] $ "label1";
}

number of items to replace is not a multiple of replacement length
In addition: Warning message:
In 1: n_comunidades:
numerical _expression_ has 82 elements: only the first used
 

Thank you

_______________________________________________
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]