is there a way to find all accessible vertices of an igraph in R, like the function acc in the graph package? I can only find a function for adjacent vertices in an igraph but not accessible vertices.
To give some context, I have a hierarchical graph, and I want to find all nodes below. I can do this with the acc function for a graph object. However, acc doesn't work with igraph
nodesBelow <- function(graph, nodes) {
sub <- character()
for(node in nodes){
sub <- c(sub, c(names(acc(graph, node)[[1]]),node))
}
sub <- unique(sub)
subGraph(sub, graph)
}