igraph-help
[Top][All Lists]
Advanced

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

[igraph] Flag Nodes that ever appeared in the main component.


From: Richard Benton
Subject: [igraph] Flag Nodes that ever appeared in the main component.
Date: Fri, 9 Feb 2018 17:04:53 -0600

Hi All,
I have a somewhat unconventional challenge that I'm trying to think through in igraph for R.

I have a list of 23 bipartite igraph objects - they are the same node set but not every node appears in every graph. These are basically waves of a longitudinal network where not every vertex appears in every year. So the graphs in the list are of different sizes. This list is called bipnetlist and consists of 23 elements which are each igraph objects.

What I want to do is create a vertex.attribute to flag whether the vertex ever appeared in the main connected component in any of the waves. I've already created a vertex.attribute flag for each year for whether the vertex appears in the main component for that year:

for (i in 1:length(bipnetlist)) {
  cl <- components(bipnetlist[[i]], mode="weak")
  V(bipnetlist[[i]])$"cluster" <- cl$membership == which.max(cl$csize)
}

I'm trying to think through how I can create a vertex.attribute flag on these graphs that indicates whether the vertex ever appeared in the main component in any of the 23 graphs.

Any ideas would be helpful.
Thanks!

Richard Benton
Assistant Professor
University of Illinois

reply via email to

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