Return root, end, or branchpoints of an igraph object
graph.nodes(
x,
type = c("root", "end", "branch"),
original.ids = "label",
exclude.isolated = TRUE
)An ngraph or raw igraph object
one of root, end (which includes root) or branch
Use named attribute to return original vertex ids (when available). Set to FALSE when this is not desired.
Do not count isolated vertices as root points (default)
This function underlies rootpoints.igraph methods and
friends. It is conceived of as slightly lower level and end users would
normally use the rootpoints methods.
graph.nodes should work for any igraph object
(including ngraph objects, which inherit from igraph).
However the graph must be directed in order to return a root point