igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] changing the membership vector


From: Gábor Csárdi
Subject: Re: [igraph] changing the membership vector
Date: Sat, 15 Nov 2014 09:08:43 -0500

On Sat, Nov 15, 2014 at 9:07 AM, Fatemeh a <address@hidden> wrote:
Hi,

for example to use the commuity membership of the karate (wckarate) (vertex community membership) to induce the subgraph of other graph ( here :karate3 ) which has some vertex or all the vertex of the first graph but connect differently   

sapply(sort(unique(membership(wckarate))), function(g) {
    subg1<-induced.subgraph(karate,which(membership(wckarate)==g)) })

You can do this, without problem. You need to be careful to match the vertices of the two graphs, but other than that, it is fine.

Gabor
 

thank you,
fatemeh


On Sat, Nov 15, 2014 at 4:56 PM, Gábor Csárdi <address@hidden> wrote:
Hi,

I am not sure what you mean by "using" the membership vector.

Gabor

On Sun, Nov 9, 2014 at 2:28 AM, Fatemeh a <address@hidden> wrote:
> Hi,
>
> My question is regards manipulating or changing the membership vector :
>
> what I am trying to do is to use the community membership of a graph for
> another graph or in other words changing the community membership of the
> second graph[the second graph has some of the vertex of the first one]
>
> in other words :consider the below example :
>
> i want to use membership (wckarate) for karate3
>
> karate <- graph.famous("Zachary")
> karate <-as.matrix(karate)
> karate3=read.csv(file.choose())
> karate3=as.matrix(karate3)
> karate3=graph.data.frame(karate3,directed=FALSE)
> wckarate3=walktrap.community(karate3)
> wckarate=walktrap.community(karate)
>
>
> the attached file is the second graph.
>
> regards,
> fatemeh
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



--
regards
F..A

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