Convert edgepaths from shortest.paths function to edgelist
I am trying to first get the shortest paths then convert the paths to edgelist . Is there any function to convert the edge paths(epath) to edgelist in igraph ?
Are you using the "shortest_paths" function? You can specify the output as vpath, epath, or both:
shortest_paths(g, from = 1, to = 4, output = "both")
from the documentation for "output" in shortest_paths:
Character scalar, defines how to report the shortest paths. “vpath” means that the vertices along the paths are reported, this form was used prior to igraph version 0.6. “epath” means that the edges along the paths are reported. “both” means that both forms are returned, in a named list with components “vpath” and “epath”.
Closed as this is a support question, not a genuine issue.