Temporal networks with R and igraph (updated)

You may also like...

11 Responses

  1. Shilin Jia says:

    Thank you a lot for the update! I didn’t see the updated version at first and almost decided to downgrade igraph to 0.7.1. Your code is really elegant and helped my project a great deal. However, I believe that there is one line missing in your code. After deleting edges in the for loop, there should be a line of hiding inactive nodes. It’s only a miner point though.

  2. Anonymous says:

    This is so helpful! Thank you! I updated to igraph 1.0 and was lost about how to animate some networks I simulated without this tutorial. Bravo!

  3. shari says:

    Awesome 🙂 I came across previous version and was disappointed it did not work anymore, but found this post when I started to fix it myself..

  4. Anonymous2 says:

    A big thank you for this helpful post. Really incredibly useful, including that you posted the code and step-by-step explanations. Thanks again!

  5. Johannes Björk says:

    Great post, thanks! Would it be possible if the edge list contained several interactions per time point, i.e. where many nodes can appear/disappear per time point?

    Following your example data, it would look something like this:

    “id1”, “id2”, “time”
    1 2 1
    1 3 1
    2 3 1
    3 2 2
    2 4 2
    1 3 2
    5 6 2
    4 5 3
    1 6 3
    6 3 3
    . . .
    . . .
    . . .

  6. Rolf says:

    Many thanks for the great post. I have a question: You say that it “considers past/present/future nodes/edges when calculating the the layout, but displays only present nodes/edges in the plot by making past and future nodes/edges transparent”. From what I understand, and can see, it does not make past edges transparent, even if they are not present at time t.

  7. admin says:

    Thanks for your interest. If you just want to show present ties you will have to change the condition which(E(g)$time > time) to which(E(g)$time > time & E(g)$time < = time + delta) in line 34

  8. admin says:

    Yes, in principle it could handle that kind of dynamics.

  9. Jan Medina says:

    Thano you! It is a great post.

    If you want diferent colors for the old and new nodes, what is best way to do this?

  1. December 21, 2015

    […] UPDATE: the version of the R code in this post does not work with newer versions of the igraph package (> 1.0). I have posted an updated version of this post here: Temporal networks with R and igraph (updated) […]

  2. April 20, 2016

    […] less pretty, standard ones can also be used. Although I didn’t use the temporal part, “temporal networks with R and igraph” served as my template. Furthermore, I searched the web-pages stack overflow or r-bloggers to […]

Leave a Reply

Your email address will not be published.