Newbie here, so any help appreciated!
I have a weighted tree graph whose branches interest me. Can I use igraph
to easily find branches (i.e. their edges and vertices) off a given path? Suppose I have a diameter path
E(mg, path = diam)
and branches off that path. Can I find branches, do stats with their weights, interrogate their associations with other things etc.?
Thanks a lot!
zo
Reproducible example:
library(igraph)
g <-erdos.renyi.game(50, 3/50)
mg <- minimum.spanning.tree(g)
diam <- get.diameter(mg)
E(mg)$color = "black"
E(mg, path = diam)$color = "purple"
E(mg, path = diam)$width = 6
So the question is: how do I extract the branches off the purple line within igraph? I'd like extract the branches off of the purple path and keep them in a data frame or some other object. Any thoughts?