igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] delete.edges +community detection


From: Gábor Csárdi
Subject: Re: [igraph] delete.edges +community detection
Date: Wed, 22 Oct 2014 11:12:28 -0400

Hi,

you don't need to mark the edges, just remove them right away:

karate <- graph.famous("Zachary")
fc <- infomap.community(karate)
karate <- delete.edges(karate, E(karate)[crossing(fc, karate)])
write.csv(get.data.frame(karate), file = "karate.csv")

Gabor

On Tue, Oct 21, 2014 at 10:25 PM, Fatemeh a <address@hidden> wrote:
> Hi,
>
> Sorry for my rather easy question, I am quite new to igraph and R.
> what I am trying to do is to write the edge list after runnig comunity
> detection algorithms (the new clustered graph) to a .CSV file  which list
> the new relationship after running community detection ( "edge list")
>
> consider this example :
>
> karate <- graph.famous("Zachary")
> fc <- infomap.community(karate)
> karate=set.edge.attribute(karate, "delete", index=E(karate),
> value=crossing(fc,karate))
> delete.edges(karate,E(karate,"delete"=TRUE))
> write.csv(get.data.frame(karate),file="karate.csv")
>
> the delete part is not working what I am trying to do is to delete the edges
> that it's  delete attribute is true which are the edges between communities
> so i could get the relations just in communities and not between them (is
> that right ?).
>
>
> thanks you in advance
>
> --
> regards,
> Fatemeh
>
> _______________________________________________
> 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]