igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] dendrogram


From: Tamas Nepusz
Subject: Re: [igraph] dendrogram
Date: Thu, 25 Nov 2010 10:04:43 +0000

Dear Prof. Freeman,

> I have read the following example:
> [...]
> modularity(g, memb$membership)
> 
> But suppose I have a file containing the membership vector.  How do I use 
> that instead
> of the membership vector that was produced by the walktrap.community 
> operation?
Read that file into R somehow (e.g., by using scan() or read.table()), then 
simply pass the vector you've loaded into modularity() as the second argument. 
E.g.:

membership <- scan("my_membership_vector.txt")
modularity(g, membership)

-- 
T.




reply via email to

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