Currently I'm applying network analysis on multiple igraph objects. For example, I want to know the indegree and outdegree of actors in the network. The code that I use for this is as follows:
indeg2005 = degree(d2005, mode = "in")
outdeg2005 = degree(d2005, mode = "out")
Which gives interesting results. My network, however, goes back until d1965. A first option is to cut and paste the code above for each network, like:
indeg2005 = degree(d2005, mode = "in")
outdeg2005 = degree(d2005, mode = "out")
indeg2004 = degree(d2004, mode = "in")
outdeg2004 = degree(d2004, mode = "out")
indeg2003 = degree(d2003, mode = "in")
outdeg2003 = degree(d2003, mode = "out")
This is, however, a complex and long way to do this. I've been looking to ways to make this more straightforward, for example by using the loop function 'for', but so far I haven't managed to find a shorter solution. Could anyone advise on this?
Thanks a million.
Best regards,
Mathias De Roeck