igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] print community tersely


From: Gábor Csárdi
Subject: Re: [igraph] print community tersely
Date: Sat, 18 Aug 2012 20:25:55 -0400

On Fri, Aug 17, 2012 at 3:35 PM, Sam Steingold <address@hidden> wrote:
> print(community) prints
> --8<---------------cut here---------------start------------->8---
> Graph community structure calculated with the multi level algorithm
> Number of communities (best split): 55
> Modularity (best split): 0.4787963
> Membership vector:
>  .....
>  .....
>  .....
> --8<---------------cut here---------------end--------------->8---
> is there a way to print it without the membership vector?

You can write your own printing function, if you don't like this
output. Call it print.communities(). You can put it together from

algorithm(community)
length(community)
modularity(community)

See ?communities for the details.

> (or, better yet, with table(membership) instead of membership)?

Use

table(membership(community))

in your printing function.

G.

> Thanks!
> --
> Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 
> 11.0.11103000
> http://www.childpsy.net/ http://memri.org http://truepeace.org
> http://pmw.org.il http://openvotingconsortium.org http://dhimmi.com
> Diplomacy is the art of saying "nice doggy" until you can find a nice rock.
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

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