igraph-help
[Top][All Lists]
Advanced

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

[igraph] object 'membership' not found


From: Glazko, Galina V
Subject: [igraph] object 'membership' not found
Date: Wed, 13 Jul 2011 10:49:29 -0500

Hello,

 

I am having a strange error; I did not see it before:

I have a large graph gs:

 

> summary(gs)

Vertices: 15088

Edges: 993338

Directed: FALSE

No graph attributes.

Vertex attributes: name.

No edge attributes.

 

is.connected(gs)

[1] TRUE

 

I am calculating modularity:

 

> mog.com<-fastgreedy.community(gs)

> memb <- community.to.membership(gs, mog.com$merges, steps=which.max(mog.com$modularity)-1 )

> modularity(gs, memb$membership)

[1] 0.4051626

 

and I want to get subgraph of  module N3:

 

$csize

[1] 3620 7290 3767   85   60   19    5    7    4    3    9    7    8    8    3    6    7    3    3    3    3    4    4    6    4    5    6    2    3    5    4    4    3    7

[35]    4    4    4    2    3    2    3    5    4    2    3    3    3    3    3    3    2    4    3    2    3    3    2    3    2    2    2    2    2    2    2    2    2    2

[69]    2    2    2    2    2    2    2    2    2

 

> i<-3

> s<-subgraph(gs,V(gs)[ membership == (i-1) ])

Error in eval(expr, envir, enclos) : object 'membership' not found

 

I do not understand the reason of this error message, what I am doing wrong?

 

thank you

best regards

 

Galina

Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information.  Any unauthorized review,
use, disclosure or distribution is prohibited.  If you are not the
intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message..

reply via email to

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