I have been using igraph in R for a while, but my knowledge is limited to the user manual. My question is: Is there a way to programatically obtain the edges once an edge is selected using E()?
Here is an example: #a small world network > N<-simplify(watts.strogatz.game(1,10,2,.05)) #now i select a specified edge > a<-E(N)[2] > a Edge sequence: e e [2] 3 -- 2
Now, I need a piece of code that would be of the form b<-f(a) with the output b=c(2,3)
For a directed edge, it should be of the form c(source_vertex,destination_vertex)
Is this possible? Ideally, such a code should work in for loops as well.
On a related note, if i choose a vertex say V(A)[i], can a function return a vector of the index numbers of all edges passing through it?