igraph-help
[Top][All Lists]
Advanced

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

[igraph] creating edge attribute from similarity on vertex attribute


From: Richard Benton
Subject: [igraph] creating edge attribute from similarity on vertex attribute
Date: Thu, 17 Jul 2014 10:25:12 -0400

Hi All,
I'm working with igraph in R and I'm trying to create an edge attribute in my network based on nodes' similarity on a vertex attribute. I already have the vertex attribute read into the igraph object.

For example, "speakers" is an igraph object with vertex attribute "birthyear." I want to create an edge attribute "ageband5" with value 1 if two vertices in a dyad have birthyear within 5 years from one another.
Alternatively, "birthyeardiff" could be an edge attribute that is the difference between the "birthyear" of each vertex in a dyad.
How can this be done?
Thank you,
Richard 


reply via email to

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