input:
data.frame(from = c(NA, 2, 4, 5, 8, 8, 1),
to = c(1, 3, 7, 6, 9, 10, 11))
from to
NA 1
2 3
4 7
5 6
8 9
8 10
1 11
I want to know how to use igraph to select a starting vertex, and get all the continuously connected vertices.
example
select(2) -> c(2, 3)
select(4) -> c(4, 7)
select(1) -> c(1, 11)
select(8) -> c(8, 9, 10)
The idea is: I don't know the ending vertex, I just know the starting point and I want to return the continuous path starting from this point